Optimized querySelector(All) when selector contains #id
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-01  Benjamin Poulain  <benjamin@webkit.org>
2
3         Optimized querySelector(All) when selector contains #id
4         https://bugs.webkit.org/show_bug.cgi?id=116502
5
6         Reviewed by Andreas Kling.
7
8         Test: fast/selectors/querySelector-id-filtering.html
9
10         The idea of this patch is to perform querySelector on a subtree
11         rooted at the last element with #id matching. For example, if we have the selector
12         "#foobar div a", we start by looking for the element with ID foobar in the TreeScope
13         cache, and start matching the children from there.
14
15         The idea comes from Rune for
16         https://chromium.googlesource.com/chromium/blink/+/1cd83d3588973a02ab15d94b1b05a28620853624
17         but the code as diverged too much so it had to be reimplemented specifically for WebKit.
18
19         * css/CSSSelectorList.cpp:
20         (WebCore::CSSSelectorList::CSSSelectorList):
21         (WebCore::CSSSelectorList::operator=):
22         * css/CSSSelectorList.h:
23         (WebCore::CSSSelectorList::~CSSSelectorList):
24         * css/StyleRule.h:
25         (WebCore::StyleRule::wrapperAdoptSelectorList):
26         (WebCore::StyleRulePage::wrapperAdoptSelectorList):
27         * dom/SelectorQuery.cpp:
28         (WebCore::isSingleTagNameSelector):
29         (WebCore::isSingleClassNameSelector):
30         (WebCore::findIdMatchingType):
31         (WebCore::SelectorDataList::SelectorDataList):
32         (WebCore::filterRootById):
33         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
34         (WebCore::SelectorDataList::execute):
35         (WebCore::SelectorQuery::SelectorQuery):
36         (WebCore::SelectorQueryCache::add):
37         * dom/SelectorQuery.h:
38         (WebCore::SelectorDataList::SelectorData::SelectorData):
39
40 2014-02-28  Alexey Proskuryakov  <ap@apple.com>
41
42         Node::compareDocumentPosition leaks memory structure
43         https://bugs.webkit.org/show_bug.cgi?id=120244
44
45         Reviewed by Ryosuke Niwa.
46
47         * dom/Node.cpp: (WebCore::Node::compareDocumentPosition): Don't do it.
48
49 2014-03-01  David Kilzer  <ddkilzer@apple.com>
50
51         Fix lifetime handling of SVGPropertyTearOffs
52         <http://webkit.org/b/129211>
53         <rdar://problem/15696025>
54
55         Reviewed by Maciej Stachowiak.
56
57         Merged from Blink (patch by Ojan Vafai):
58         https://src.chromium.org/viewvc/blink?revision=157801&view=revision
59         http://crbug.com/288771
60
61             -Replace SVGStaticPropertyWithParentTearOff with SVGMatrixTearOff
62             since it's only used in that one place. This means we can get rid
63             of the templatizing and the method pointer.
64             -Change SVGPropertyTearOff to keep track of it's child tearoffs
65             and call detachWrapper on its child tearoffs when it's destroyed
66             or when it's wrapper is detached.
67             -Have SVGPropertyTearOff hold WeakPtrs to the child tearoffs
68             to avoid having a cycle.
69
70         Test: svg/transforms/svg-matrix-tearoff-crash.html
71
72         * GNUmakefile.list.am:
73         * WebCore.vcxproj/WebCore.vcxproj:
74         * WebCore.vcxproj/WebCore.vcxproj.filters:
75         * WebCore.xcodeproj/project.pbxproj:
76         * bindings/scripts/CodeGeneratorJS.pm:
77         (NativeToJSValue):
78         * svg/properties/SVGMatrixTearOff.h: Renamed from Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h.
79         (WebCore::SVGMatrixTearOff::create):
80         (WebCore::SVGMatrixTearOff::commitChange):
81         (WebCore::SVGMatrixTearOff::SVGMatrixTearOff):
82         * svg/properties/SVGPropertyTearOff.h:
83         (WebCore::SVGPropertyTearOff::addChild):
84         (WebCore::SVGPropertyTearOff::detachChildren):
85
86 2014-03-01  Zan Dobersek  <zdobersek@igalia.com>
87
88         Unreviewed build fix after r164913.
89
90         * platform/CountedUserActivity.h: Some ports don't (yet) support forwarding headers for WebCore,
91         so UserActivity.h should be included as non-forwarding.
92
93 2014-03-01  Gavin Barraclough  <barraclough@apple.com>
94
95         Change PageActivityAssertionToken to use a WeakPtr
96         https://bugs.webkit.org/show_bug.cgi?id=129526
97
98         Reviewed by Sam Weinig.
99
100         PageThrottler effectively implements a bespoke weak pointer mechanism; remove this & just use WeakPtr.
101
102         * page/PageActivityAssertionToken.cpp:
103         (WebCore::PageActivityAssertionToken::PageActivityAssertionToken):
104         (WebCore::PageActivityAssertionToken::~PageActivityAssertionToken):
105             - addActivityToken->incrementActivityCount, removeActivityToken->decrementActivityCount
106         * page/PageActivityAssertionToken.h:
107             - removed invalidate, made m_throttler a WeakPtr
108         * page/PageThrottler.cpp:
109         (WebCore::PageThrottler::PageThrottler):
110             - initialize m_weakPtrFactory, m_activityCount.
111         (WebCore::PageThrottler::~PageThrottler):
112             - removed called to invalidate.
113         (WebCore::PageThrottler::startThrottleHysteresisTimer):
114             - m_activityTokens.size()->m_activityCount
115         (WebCore::PageThrottler::throttleHysteresisTimerFired):
116             - m_activityTokens.size()->m_activityCount
117         (WebCore::PageThrottler::incrementActivityCount):
118             - m_activityTokens.add->++
119         (WebCore::PageThrottler::decrementActivityCount):
120             - m_activityTokens.remove->--
121         * page/PageThrottler.h:
122         (WebCore::PageThrottler::weakPtr):
123             - replaced HashSet with WeakPtrFactory & count.
124
125 2014-03-01  Gavin Barraclough  <barraclough@apple.com>
126
127         Split UserActivity/CountedUserActivity
128         https://bugs.webkit.org/show_bug.cgi?id=129520
129
130         Reviewed by Sam Weinig.
131
132         UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
133         In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
134
135         * WebCore.exp.in:
136             - beginActivity->start, endActivity->stop.
137         * WebCore.xcodeproj/project.pbxproj:
138         * page/PageThrottler.cpp:
139         (WebCore::PageThrottler::PageThrottler):
140         (WebCore::PageThrottler::~PageThrottler):
141         (WebCore::PageThrottler::throttlePage):
142         (WebCore::PageThrottler::unthrottlePage):
143         (WebCore::PageThrottler::setIsVisuallyIdle):
144             - beginActivity->increment, endActivity->decrement.
145         * page/PageThrottler.h:
146             - UserActivity->CountedUserActivity for m_pageActivity
147         * platform/CountedUserActivity.h: Copied from Source/WebCore/platform/UserActivity.h.
148         (WebCore::CountedUserActivity::CountedUserActivity):
149         (WebCore::CountedUserActivity::increment):
150         (WebCore::CountedUserActivity::decrement):
151             - Added, provides counted interface to UserActivity.
152         * platform/UserActivity.cpp:
153         (WebCore::UserActivity::UserActivity):
154             - m_count removed
155         (WebCore::UserActivity::start):
156         (WebCore::UserActivity::stop):
157             - beginActivity->start, endActivity->stop, implentation now empty.
158         * platform/UserActivity.h:
159             - beginActivity->start, endActivity->stop, m_count moved to HAVE(NS_ACTIVITY)
160         * platform/mac/UserActivityMac.mm:
161         (WebCore::UserActivity::UserActivity):
162             - m_count->m_started
163         (WebCore::UserActivity::isValid):
164             - m_count->m_started
165         (WebCore::UserActivity::start):
166         (WebCore::UserActivity::stop):
167             - beginActivity->start, endActivity->stop, no longer nest
168
169
170 2014-02-28  Benjamin Poulain  <benjamin@webkit.org>
171
172         Caller saved registers can be accidentally discarded when clearing the local stack
173         https://bugs.webkit.org/show_bug.cgi?id=129532
174
175         Reviewed by Andreas Kling.
176
177         Tests: fast/selectors/tree-modifying-case-insensitive-selectors.html
178                fast/selectors/tree-modifying-selectors.html
179
180         StackAllocator::discard() no longer make sense now that we can use caller saved regsiter.
181         We should instead discard everything up to the beginning of the local stack.
182
183         * cssjit/SelectorCompiler.cpp:
184         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
185         * cssjit/StackAllocator.h:
186         (WebCore::StackAllocator::popAndDiscardUpTo):
187
188 2014-02-28  Andy Estes  <aestes@apple.com>
189
190         [iOS] FrameLoader has a NULL m_progressTracker when initialized with initForSynthesizedDocument()
191         https://bugs.webkit.org/show_bug.cgi?id=129534
192
193         Reviewed by Simon Fraser.
194
195         No new tests because TestWebKitAPI does not yet support iOS. See <http://webkit.org/b/129535>.
196
197         * loader/FrameLoader.cpp:
198         (WebCore::FrameLoader::initForSynthesizedDocument): Create a FrameProgressTracker.
199
200 2014-02-28  Sam Weinig  <sam@webkit.org>
201
202         ASSERT(isMainThread()) hit under platformUserPreferredLanguages() with WebKit1 and WebKit2 in the same process
203         https://bugs.webkit.org/show_bug.cgi?id=129528
204
205         Reviewed by Andreas Kling.
206
207         * platform/mac/Language.mm:
208         (WebCore::preferredLanguagesMutex):
209         (WebCore::preferredLanguages):
210         (+[WebLanguageChangeObserver languagePreferencesDidChange:]):
211         (WebCore::httpStyleLanguageCode):
212         (WebCore::platformUserPreferredLanguages):
213         Add a mutex and do an isolated copy of the strings to allow this function to be called from multiple threads.
214
215 2014-02-28  Dean Jackson  <dino@apple.com>
216
217         Crash at ebay.com when viewing auction items at com.apple.WebCore: WebCore::GraphicsContext3D::getExtensions + 10
218         https://bugs.webkit.org/show_bug.cgi?id=129523
219
220         Reviewed by Simon Fraser.
221
222         * html/canvas/WebGLRenderingContext.cpp:
223         (WebCore::WebGLRenderingContext::getSupportedExtensions): Early return if the
224         context is pending policy resolution.
225
226 2014-02-28  Andreas Kling  <akling@apple.com>
227
228         Micro-optimize JSNodeOwner::isReachableFromOpaqueRoots().
229         <https://webkit.org/b/129518>
230
231         Only do image and audio element specific checks for element nodes.
232         Time spent in here goes from 0.8% to 0.5% on DYEB.
233
234         Reviewed by Benjamin Poulain.
235
236         * bindings/js/JSNodeCustom.cpp:
237         (WebCore::isReachableFromDOM):
238
239 2014-02-28  Geoffrey Garen  <ggaren@apple.com>
240
241         JSC Assertion failure every time I start Safari (r164846)
242         https://bugs.webkit.org/show_bug.cgi?id=129510
243
244         Reviewed by Mark Hahnenberg.
245
246         Take the lock before allocating objects because afterward is too late.
247
248         * bindings/js/ScriptController.cpp:
249         (WebCore::ScriptController::evaluateInWorld):
250         (WebCore::ScriptController::windowScriptNPObject):
251         (WebCore::ScriptController::jsObjectForPluginElement):
252
253 2014-02-28  Joseph Pecoraro  <pecoraro@apple.com>
254
255         Web Inspector: ASSERT in WebCore::JSDOMWindowBase::supportsRichSourceInfo inspecting iOS
256         https://bugs.webkit.org/show_bug.cgi?id=129512
257
258         Reviewed by Simon Fraser.
259
260         * page/PageDebuggable.cpp:
261         (WebCore::PageDebuggable::connect):
262         (WebCore::PageDebuggable::disconnect):
263
264 2014-02-28  Anders Carlsson  <andersca@apple.com>
265
266         VisitedLinkStore should be able to invalidate link styles for associated pages
267         https://bugs.webkit.org/show_bug.cgi?id=129515
268
269         Reviewed by Dan Bernstein.
270
271         * page/Page.cpp:
272         (WebCore::Page::Page):
273         Add the VisitedLinkStore if we have one.
274
275         (WebCore::Page::~Page):
276         Remove the VisitedLinkStore if we have one.
277
278         * page/VisitedLinkStore.cpp:
279         (WebCore::VisitedLinkStore::~VisitedLinkStore):
280         Assert that we don't have any pages.
281
282         (WebCore::VisitedLinkStore::addPage):
283         Add the page to the set.
284
285         (WebCore::VisitedLinkStore::removePage):
286         Remove the page from the set.
287
288         (WebCore::VisitedLinkStore::invalidateStylesForAllLinks):
289         Traverse all the pages and invalidate the style for all links.
290
291         (WebCore::VisitedLinkStore::invalidateStylesForLink):
292         Traverse all the pages and invalidate the style for a given link.
293
294         * page/VisitedLinkStore.h:
295         Add new members.
296
297 2014-02-28  Benjamin Poulain  <bpoulain@apple.com>
298
299         [iOS][WK2] highlight rects should never big bigger than the view
300         https://bugs.webkit.org/show_bug.cgi?id=129472
301
302         Reviewed by Enrica Casucci.
303
304         * WebCore.exp.in:
305
306 2014-02-28  Beth Dakin  <bdakin@apple.com>
307
308         Turn off margin tiles on iOS
309         https://bugs.webkit.org/show_bug.cgi?id=129509
310         -and corresponding-
311         <rdar://problem/16200383>
312
313         Reviewed by Simon Fraser.
314
315         * page/FrameView.cpp:
316         (WebCore::FrameView::needsExtendedBackgroundRectForPainting):
317
318 2014-02-28  Zalan Bujtas  <zalan@apple.com>
319
320         Subpixel rendering: Add subpixel support to border type of double, groove, ridge, inset and outset.
321         https://bugs.webkit.org/show_bug.cgi?id=129226
322
323         Reviewed by Simon Fraser.
324
325         This is the conversion of double, inset, outset, groove and ridge border type
326         painting to support device pixel precision width/height.
327
328         Regression is covered by existing tests.
329
330         * rendering/RenderObject.cpp:
331         (WebCore::RenderObject::drawLineForBoxSide):
332         * rendering/RenderObject.h:
333
334 2014-02-28  Adenilson Cavalcanti  <cavalcantii@gmail.com>
335
336         Filters should test for area instead of single dimension
337         https://bugs.webkit.org/show_bug.cgi?id=123716
338
339         Reviewed by Dirk Schulze.
340
341         A filtered SVG element with a sigle dimension bigger than 5000
342         (counting the margin/border) will fail to render. So an element
343         with 4000x4000 will render fine, while another with 5000x10
344         won't. This patch instead tests against the total element area,
345         which fixes such cases.
346
347         It also fixes some layer violations where FilterEffectRenderer and
348         RenderSVGResourceFilter were directly accessing the maximum filter
349         size in FilterEffect. Since before a somewhat bigger filter would
350         be aborted, it required to change the maximum kernel size
351         for blur filter (some filters are slower to run than others for
352         bigger SVGs).
353
354         Tests: svg/filters/big-height-filter-expected.svg
355                svg/filters/big-height-filter.svg
356                svg/filters/big-width-filter-expected.svg
357                svg/filters/big-width-filter.svg
358
359         * platform/graphics/filters/FEGaussianBlur.cpp:
360         * platform/graphics/filters/FilterEffect.cpp:
361         (WebCore::FilterEffect::maxFilterArea): New function, returns the
362         maximum allowed element area (currently is 4096 x 4096).
363         (WebCore::FilterEffect::isFilterSizeValid): Now it tests for
364         element area instead of a single dimension. This code is reused by
365         FilterEffectRenderer.
366         * platform/graphics/filters/FilterEffect.h:
367         * rendering/FilterEffectRenderer.cpp:
368         (WebCore::FilterEffectRenderer::updateBackingStoreRect): Uses the
369         new function in FilterEffect to test for valid sizes.
370         (WebCore::FilterEffectRendererHelper::beginFilterEffect): Same case.
371         * rendering/svg/RenderSVGResourceFilter.cpp:
372         (WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Test
373         for maximum area and properly changes the scale of transformed
374         element to fit.
375
376 2014-02-28  Brent Fulgham  <bfulgham@apple.com>
377
378         [Mac, iOS] Incorrect ordering of construction arguments for out-of-band text elements
379         https://bugs.webkit.org/show_bug.cgi?id=129501
380         <rdar://problem/16198587>
381
382         Reviewed by Eric Carlson.
383
384         * html/HTMLMediaElement.cpp:
385         (WebCore::HTMLMediaElement::parseAttribute): Correct order of arguments
386         to PlatformTextTrack.
387
388 2014-02-28  Bem Jones-Bey  <bjonesbe@adobe.com>
389
390         Properly clear m_logicallyLastRun to remove use-after-free possibility
391         https://bugs.webkit.org/show_bug.cgi?id=129489
392
393         Reviewed by David Hyatt.
394
395         A use-after-free issue was caught in Blink because m_logicallyLastRun
396         is not cleared when the item it points to is deleted. Clearing it
397         turns the use-after-free into a segfault, and prevents any future
398         use-after-frees from happening.
399
400         * platform/text/BidiRunList.h:
401         (WebCore::BidiRunList<Run>::deleteRuns):
402
403 2014-02-28  Jer Noble  <jer.noble@apple.com>
404
405         [Mac] Disambiguate calls to [[window contentView] layer] and [... setLayer:]
406         https://bugs.webkit.org/show_bug.cgi?id=129491
407
408         Reviewed by Alexey Proskuryakov.
409
410         -[NSWindow contentView] returns a bare id, leading to ambiguity when calling
411         certain methods, including -layer and -setLayer:. Resolve the ambiguity by
412         explicitly casting the -contentView call to a NSView*.
413
414         * platform/mac/WebVideoFullscreenController.mm:
415         (-[WebVideoFullscreenController setupVideoOverlay:]):
416         (-[WebVideoFullscreenController windowDidLoad]):
417         (-[WebVideoFullscreenController windowDidExitFullscreen]):
418
419 2014-02-28  Andreas Kling  <akling@apple.com>
420
421         MouseEvent.offsetX/Y should just return 0,0 for simulated clicks.
422         <https://webkit.org/b/129477>
423
424         There's no need to compute the exact target-relative coordinates for
425         simulated mouse events, e.g those fired by HTMLElement.click().
426
427         The offsetX/Y properties are not supported by Firefox.
428
429         Test: fast/events/relative-offset-of-simulated-click.html
430
431         Reviewed by Alexey Proskuryakov.
432
433         * dom/MouseRelatedEvent.cpp:
434         (WebCore::MouseRelatedEvent::offsetX):
435         (WebCore::MouseRelatedEvent::offsetY):
436
437 2014-02-27  Sergio Villar Senin  <svillar@igalia.com>
438
439         [CSS Grid Layout] Fix positioning grid items using named grid lines/areas
440         https://bugs.webkit.org/show_bug.cgi?id=129372
441
442         Reviewed by Darin Adler.
443
444         Our code was assuming that a <custom-ident> in
445         -webkit-grid-{column|row}-{start|end} and
446         -webkit-grid-{column|row} was always a grid area name. That's
447         wrong because the <custom-ident> could be also a explicitly named
448         grid line or the an implicitly named grid line created by a grid
449         area definition.
450
451         The style resolution code was not correct either. This patch fixes
452         it so it now matches the spec, which means that:
453         - first we try to match any existing grid area.
454         - then if there is a named grid line with the name
455         <custom-ident>-{start|end} for -webkit-grid-{column|row}-{start|end}
456         defined before the grid area then we use it instead of the grid
457         area.
458         - otherwise if there is a named grid line we resolve to the first such line.
459         - otherwise we treat it as 'auto'.
460
461         Fixing this uncovered a bug in GridPosition, we were not using the
462         name of the stored grid area to check if two GridPositions were
463         the same.
464
465         Tests: fast/css-grid-layout/grid-item-position-changed-dynamic.html
466                fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html
467
468         * css/StyleResolver.cpp:
469         (WebCore::gridLineDefinedBeforeGridArea): New function to check if
470         a given named grid line was defined before an implicit named grid
471         line created by a grid area definition.
472         (WebCore::StyleResolver::adjustNamedGridItemPosition): New
473         function that adjusts the position of a GridPosition parsed as a
474         grid area.
475         (WebCore::StyleResolver::adjustGridItemPosition): Use the new
476         function adjustNamedGridItemPosition to adjust the positions of
477         named grid lines.
478         * css/StyleResolver.h:
479         * rendering/RenderGrid.cpp:
480         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle): Use GridPosition:: namespace.
481         (WebCore::RenderGrid::resolveGridPositionFromStyle): Ditto.
482         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Ditto.
483         * rendering/RenderGrid.h:
484         * rendering/style/GridPosition.h:
485         (WebCore::GridPosition::adjustGridPositionForRowEndColumnEndSide): Moved from RenderGrid.cpp.
486         (WebCore::GridPosition::adjustGridPositionForSide): Ditto.
487         (WebCore::GridPosition::operator==): Use the named grid line to check equality.
488
489 2014-02-28  Zoltan Horvath  <zoltan@webkit.org>
490
491         [CSS Shapes] Update line segments for ShapeInside only if the new line is wide enough
492         https://bugs.webkit.org/show_bug.cgi?id=129461
493
494         Reviewed by David Hyatt.
495
496         Shape-inside can make a line only narrower than the original line width, thus we don't need
497         to update the line/shape segments in fitBelowFloats for every single line inside shape-inside.
498         This patch adds a helper function, which updates the line segments, furthermore it updates the
499         line segments only when the content would fit without the shape.
500
501         No new tests, no behavior change.
502
503         * rendering/line/BreakingContextInlineHeaders.h: Use new helper.
504         (WebCore::updateSegmentsForShapes):
505         * rendering/line/LineWidth.cpp: Use new helper.
506         (WebCore::LineWidth::updateLineSegment): Add new helper.
507         (WebCore::LineWidth::fitBelowFloats):
508
509 2014-02-28  Mario Sanchez Prada  <mario.prada@samsung.com>
510
511         paragraphs with different directionality in textarea with unicode-bidi: plaintext are aligned the same
512         https://bugs.webkit.org/show_bug.cgi?id=71194
513
514         Reviewed by David Hyatt.
515
516         Merged from Blink r157263 by <igor.o@sisa.samsung.com>
517         <https://src.chromium.org/viewvc/blink?revision=157263&view=revision>
518
519         In the css3-text spec (http://www.w3.org/TR/css3-text/#bidi-linebox):
520
521         The start and end edges of a line box are determined by the inline
522         base direction of the line box. In most cases, this is given by
523         its containing block's computed ‘direction’. However if its
524         containing block has ‘unicode-bidi: plaintext’, the inline base
525         direction the line box must be determined by the base direction of
526         the bidi paragraph to which it belongs: that is, the bidi
527         paragraph for which the line box holds content.
528
529         This patch just implements the behavior described above modifying
530         updateLogicalWidthForAlignment and setting the bidi level of the
531         RootInlineBox.
532
533         * rendering/RenderBlockFlow.h:
534         * rendering/RenderBlockLineLayout.cpp:
535         (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
536         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
537         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
538         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
539         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
540         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
541         (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
542
543 2014-02-28  Jochen Eisinger  <jochen@chromium.org>
544
545         Update meta-referrer behavior for invalid policies
546         https://bugs.webkit.org/show_bug.cgi?id=129475
547
548         This patch aligns the behavior with the CSP 1.1 referrer directive,
549         where the fallback for an invalid value is the "never" policy.
550
551         Original patch from Mike West: https://src.chromium.org/viewvc/blink?view=rev&revision=165627
552
553         Reviewed by Alexey Proskuryakov.
554
555         Test: http/tests/security/referrer-policy-invalid.html
556
557         * dom/Document.cpp:
558         (WebCore::Document::processReferrerPolicy):
559
560 2014-02-28  Daniel Bates  <dabates@apple.com>
561
562         SubresourceLoader::didFinishLoading() should not assert when a decode error occurs
563         https://bugs.webkit.org/show_bug.cgi?id=127029
564
565         Reviewed by Darin Adler.
566
567         SubresourceLoader::didFinishLoading() can be called for a resource (e.g. an image) that
568         failed to be decoded or, in the case of an image, whose estimated decoded size exceeds
569         the maximum decoded size (Settings::maximumDecodedImageSize()).
570
571         Test: fast/images/decoded-size-exceeds-max-decoded-size.html
572
573         * loader/SubresourceLoader.cpp:
574         (WebCore::SubresourceLoader::didFinishLoading):
575
576 2014-02-28  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
577
578         ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result) in WebCore::RenderGeometryMap::mapToContainer
579         https://bugs.webkit.org/show_bug.cgi?id=119626
580
581         SVGRenderSupport::mapLocalToContainer() was trying to apply transforms
582         in the incorrect order. Specifically, it would attempt to apply its
583         localToParentTransform before its localToBorderBoxTransform. This
584         was causing an ASSERT to fail when the computed transforms didn't
585         match up to those computed by RenderGeometryMap.
586
587         Backported from Blink: https://codereview.chromium.org/143363004
588
589         Reviewed by Simon Fraser.
590
591         Test: svg/transforms/svg-geometry-crash.html
592
593         * rendering/svg/SVGRenderSupport.cpp:
594         (WebCore::SVGRenderSupport::mapLocalToContainer):
595
596 2014-02-28  Mihnea Ovidenie  <mihnea@adobe.com>
597
598         [CSSRegions] ASSERTION FAILED: !m_regionsInvalidated in RenderFlowThread::regionAtBlockOffset
599         https://bugs.webkit.org/show_bug.cgi?id=129371
600
601         Reviewed by Andrei Bucur.
602
603         regionAtBlockOffset method is meant to be used after the flow thread validated
604         its region chain, otherwise we cannot rely on regionAtBlockOffset to determine correctly
605         the target region based on the offset in flow thread coordinates.
606
607         When the video element is collected in a named flow and displayed in a region, we ensure
608         that the region's decorations are taken into account to properly position the video.
609         However, we have to do that only if the named flow regions are validated.
610
611         I changed the method cachedRegionForCompositedLayer to check only the "cached" region
612         for a layer and not update the layer to region mappings before returning the region.
613         Because method cachedRegionForCompositedLayer does not update the region - layer mappings,
614         the code does not call regionAtBlockOffset in situations where the region chain is not validated yet.
615
616         Test: compositing/regions/video-in-overflow-region.html
617
618         * rendering/RenderFlowThread.cpp:
619         (WebCore::RenderFlowThread::getLayerListForRegion): Make it a getter that relies on
620         cached information and refrain from updating the mappings. Make it const too.
621         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
622         * rendering/RenderFlowThread.h:
623
624 2014-02-28  Xabier Rodriguez Calvar  <calvaris@igalia.com>
625
626         [GTK] Finetune captions menu as per design team
627         https://bugs.webkit.org/show_bug.cgi?id=129432
628
629         Reviewed by Eric Carlson.
630
631         Some design fine tuning of the captions dialog was required.
632         
633         No new tests, current suffice.
634
635         * Modules/mediacontrols/mediaControlsApple.js:
636         Added out class.
637         * Modules/mediacontrols/mediaControlsGtk.js:
638         (ControllerGtk.prototype.buildCaptionMenu): Setting out class when
639         menu is going to show overlap the panel right border.
640         * css/mediaControlsGtk.css:
641         (video::-webkit-media-controls-closed-captions-container.out):
642         Setting all borders to 5px;
643         (video::-webkit-media-controls-closed-captions-container h3):
644         Reduced font size and increasing top padding.
645         (video::-webkit-media-controls-closed-captions-container ul):
646         Increased top padding.
647
648 2014-02-27  Ryosuke Niwa  <rniwa@webkit.org>
649
650         Element::attributeChanged shouldn't do any work when attribute value didn't change
651         https://bugs.webkit.org/show_bug.cgi?id=129467
652
653         Reviewed by Geoffrey Garen.
654
655         Exit early in childrenChanged when the attribute value didn't change.
656
657         * dom/Attr.cpp:
658         (WebCore::Attr::setValue):
659         (WebCore::Attr::childrenChanged):
660         * dom/Element.cpp:
661         (WebCore::Element::setAttributeInternal):
662         (WebCore::Element::attributeChanged):
663         (WebCore::Element::parserSetAttributes):
664         (WebCore::Element::removeAttributeInternal):
665         (WebCore::Element::didAddAttribute):
666         (WebCore::Element::didModifyAttribute):
667         (WebCore::Element::didRemoveAttribute):
668         (WebCore::Element::cloneAttributesFromElement):
669         * dom/Element.h:
670         * dom/StyledElement.cpp:
671         (WebCore::StyledElement::attributeChanged):
672         * dom/StyledElement.h:
673         * html/HTMLInputElement.cpp:
674         (WebCore::HTMLInputElement::updateType):
675         * mathml/MathMLElement.cpp:
676         (WebCore::MathMLElement::attributeChanged):
677         * mathml/MathMLElement.h:
678         * mathml/MathMLSelectElement.cpp:
679         (WebCore::MathMLSelectElement::attributeChanged):
680         * mathml/MathMLSelectElement.h:
681         * svg/SVGElement.cpp:
682         (WebCore::SVGElement::attributeChanged):
683         * svg/SVGElement.h:
684
685 2014-02-27  Jinwoo Song  <jinwoo7.song@samsung.com>
686
687         [EFL] Remove duplicated keyboard string key from keyMap
688         https://bugs.webkit.org/show_bug.cgi?id=129469
689
690         Reviewed by Gyuyoung Kim.
691
692         "Down" key is duplicated in keyMap().
693
694         * platform/efl/EflKeyboardUtilities.cpp:
695         (WebCore::createKeyMap):
696
697 2014-02-27  Benjamin Poulain  <benjamin@webkit.org>
698
699         Unify the three call sites of SelectorQueryCache
700         https://bugs.webkit.org/show_bug.cgi?id=129249
701
702         Reviewed by Andreas Kling.
703
704         The three call sites of SelectorQueryCache were doing the exact same thing.
705         That code is mvoed to a new function Document::selectorQueryForString().
706
707         Also use String instead of AtomicString for querySelector() and querySelectorAll().
708         This prevent the call sites from creating AtomicString just for the time of the call.
709         This causes a tiny slow down on microbenchmarks that continuously query the same string
710         but has no negative impact on realistic/good test cases (and the bindings are simplified).
711
712         * dom/ContainerNode.cpp:
713         (WebCore::ContainerNode::querySelector):
714         (WebCore::ContainerNode::querySelectorAll):
715         * dom/ContainerNode.h:
716         * dom/Document.cpp:
717         (WebCore::Document::selectorQueryForString):
718         * dom/Document.h:
719         * dom/Element.cpp:
720         (WebCore::Element::webkitMatchesSelector):
721         * dom/SelectorQuery.cpp:
722         (WebCore::SelectorQueryCache::add):
723         * dom/SelectorQuery.h:
724
725 2014-02-27  Ryosuke Niwa  <rniwa@webkit.org>
726
727         JSC ignores the extra memory cost of HTMLCollection after a major GC
728         https://bugs.webkit.org/show_bug.cgi?id=129450
729
730         Reviewed by Andreas Kling.
731
732         Report the extra memory cost of HTMLCollection to JSC.
733
734         Unfortunately, the existing mechanism to report the extra memory cost in toJS is insufficient for
735         HTMLCollection since collection caches are populated later when HTMLCollection is accessed. Also,
736         the extra memory cost reported by Heap::reportExtraMemoryCost will be thrown away after a major GC.
737
738         To work around this limitation, added a visitor.reportExtraMemoryUsage call inside visitChildren
739         for interfaces with a newly added ReportExtraMemoryCost IDL extension flag to report the extra cost.
740
741         Since we may need to generate visitChildren when this flag is set, we can't automatically detect
742         and generate calls using C++ template as done in r148648.
743
744         * CMakeLists.txt:
745         * GNUmakefile.list.am:
746         * Modules/webaudio/AudioBuffer.idl:
747         * WebCore.vcxproj/WebCore.vcxproj:
748         * WebCore.xcodeproj/project.pbxproj:
749         * bindings/js/JSDOMBinding.h:
750         * bindings/scripts/CodeGeneratorJS.pm:
751         (InstanceNeedsVisitChildren):
752         (GenerateHeader):
753         (GenerateImplementation):
754         * bindings/scripts/IDLAttributes.txt:
755         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
756         (WebCore::toJS):
757         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
758         (WebCore::toJS):
759         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
760         (WebCore::toJS):
761         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
762         (WebCore::toJS):
763         * bindings/scripts/test/JS/JSTestException.cpp:
764         (WebCore::toJS):
765         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
766         (WebCore::toJS):
767         * bindings/scripts/test/JS/JSTestInterface.cpp:
768         (WebCore::toJS):
769         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
770         (WebCore::toJS):
771         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
772         (WebCore::toJS):
773         * bindings/scripts/test/JS/JSTestObj.cpp:
774         (WebCore::toJS):
775         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
776         (WebCore::toJS):
777         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
778         (WebCore::toJS):
779         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
780         (WebCore::toJS):
781         * bindings/scripts/test/JS/JSattribute.cpp:
782         (WebCore::toJS):
783         * bindings/scripts/test/JS/JSreadonly.cpp:
784         (WebCore::toJS):
785         * dom/ChildNodeList.h:
786         * dom/CollectionIndexCache.cpp: Added.
787         (WebCore::reportExtraMemoryCostForCollectionIndexCache):
788         * dom/CollectionIndexCache.h:
789         (WebCore::CollectionIndexCache::memoryCost):
790         (WebCore::NodeType>::CollectionIndexCache):
791         (WebCore::NodeType>::nodeCount):
792         (WebCore::NodeType>::computeNodeCountUpdatingListCache):
793         (WebCore::NodeType>::nodeAt):
794         (WebCore::NodeType>::invalidate):
795         * dom/DOMAllInOne.cpp:
796         * dom/LiveNodeList.cpp:
797         (WebCore::LiveNodeList::memoryCost):
798         * dom/LiveNodeList.h:
799         * dom/NodeList.h:
800         (WebCore::NodeList::memoryCost):
801         * dom/NodeList.idl:
802         * html/HTMLCollection.cpp:
803         (WebCore::HTMLCollection::updateNamedElementCache):
804         * html/HTMLCollection.h:
805         (WebCore::CollectionNamedElementCache::didPopulate):
806         (WebCore::CollectionNamedElementCache::memoryCost):
807         (WebCore::CollectionNamedElementCache::find):
808         (WebCore::HTMLCollection::memoryCost):
809         * html/HTMLCollection.idl:
810         * html/HTMLFormControlsCollection.cpp:
811         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
812
813 2014-02-27  Benjamin Poulain  <benjamin@webkit.org>
814
815         Compile attribute value matching
816         https://bugs.webkit.org/show_bug.cgi?id=129228
817
818         Reviewed by Geoffrey Garen.
819
820         Add support for compiling value matching when matching attributes in Selector.
821         This patch only adds exact matching, the other cases will follow.
822
823         There is a little infrastructure changes since FunctionCall now needs to support
824         calls taking 2 arguments. The fun begins when the arguments are not in the right
825         registers and need to be moved to the right place. Otherwise the code is straightforward.
826
827         In SelectorCompiler, it is necessary to handle two different cases of matching: case sensitive
828         and case insensitive. The choice is done in part at compilation time by asking HTMLDocument
829         if the name filter can include case insensitive attribute. The other part is done at runtime
830         by querying the element for its type and document.
831
832         Test: fast/selectors/case-insensitive-value-matching.html
833
834         * css/SelectorChecker.cpp:
835         (WebCore::attributeValueMatches): Null values matching should never happen, when an attribute
836         has no value, its value is empty.
837
838         * cssjit/FunctionCall.h:
839         (WebCore::FunctionCall::FunctionCall):
840         Add support for calls with two arguments.
841         (WebCore::FunctionCall::setOneArgument):
842         (WebCore::FunctionCall::setTwoArguments):
843         (WebCore::FunctionCall::swapArguments):
844         Here we need to swap two registers, but we cannot allocate a new register (because the context
845         of the function call may have taken all the available registers already).
846
847         On x86, the solution is simple, we can swap the two registers without side effects.
848
849         On other platforms, it is a little more complex. If there is any available register, we can just
850         use it as a temporary to make the swap.
851         If there are no available registers, we know that all the registers are taken. Since swapArguments()
852         was called after pushing all the arguments on the stack, we can safely trash the value of any of those.
853         We take the first available register that is not a function argument and use it as a temporary.
854
855         (WebCore::FunctionCall::prepareAndCall):
856         This is the fun part, we have two registers where the values must go before the function call. The values
857         can be in any combination of the allocated registers. The code here needs to move the two values to
858         their target register while avoiding conflicts.
859
860         * cssjit/SelectorCompiler.cpp:
861         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
862         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch):
863         (WebCore::SelectorCompiler::AttributeMatchingInfo::selector):
864         The value of HTMLDocument::isCaseSensitiveAttribute is needed at compilation time to compute the number
865         of required registers. As a result, we need to keep it along in the selector fragment.
866
867         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
868         (WebCore::SelectorCompiler::attributeNameTestingRequiresNamespaceRegister):
869         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
870         (WebCore::SelectorCompiler::minimumRegisterRequirements):
871         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
872         (WebCore::SelectorCompiler::canMatchStyleAttribute):
873         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeStyleAttribute):
874         (WebCore::SelectorCompiler::canMatchAnimatableSVGAttribute):
875         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeAllAnimatedSVGAttribute):
876         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
877         The matching code is moved in a local scope. This is done to recover the register of qualifiedNameImpl
878         before doing any value matching. That register can then be used to store the expected value when matching
879         an attribute value.
880         It is unfortunate there is so much register pressure in this part.
881
882         Value matching is done outside the loop. The idea is to keep the loop really small since in the vast majority
883         of cases, name matching fails.
884         If the value matching fails, we jump back into the tight loop.
885
886         This is not ideal in all situation. For example trivial name matching with trivial value matching should
887         be done in loop. There is a FIXME to improve those cases later.
888
889         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
890         (WebCore::SelectorCompiler::testIsHTMLClassOnDocument):
891         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
892         In the case sensitive branch, things are really simple. We have to AtomicStringImpl pointers, if they
893         don't match, it is a failure.
894
895         The case sensitive branch start by comparing the pointers in case the values are equal. This is a common
896         case and it simplifies the cases for SVG, XHTML, etc.
897         If the two values are not equal, we must first find if the context requires case insensitive comparison
898         (HTMLElement in HTMLDocument). If the conditions require case insensitive matching, we then fall back
899         to a function call.
900
901         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
902         * dom/Attribute.h:
903         (WebCore::Attribute::valueMemoryOffset):
904         * dom/Document.h:
905         (WebCore::Document::documentClassesMemoryOffset):
906         (WebCore::Document::isHTMLDocumentClassFlag):
907         * dom/Node.h:
908         (WebCore::Node::treeScopeMemoryOffset):
909         * dom/TreeScope.h:
910         (WebCore::TreeScope::documentScopeMemoryOffset):
911
912 2014-02-27  Ryuan Choi  <ryuan.choi@samsung.com>
913
914         Build break when disabled CSS_GRID_LAYOUT
915         https://bugs.webkit.org/show_bug.cgi?id=129459
916
917         Reviewed by Gyuyoung Kim.
918
919         * css/CSSValue.h: Added guards of CSS_GRID_LAYOUT for GridTemplateAreasClass.
920
921 2014-02-17  Myles C. Maxfield  <mmaxfield@apple.com>
922
923         text-decoration-skip: ink does not skip over SVG fonts
924         https://bugs.webkit.org/show_bug.cgi?id=128936
925
926         Reviewed by Darin Adler.
927
928         When drawing glyphs in an SVG font, the glyphs are converted to paths and then filled. This patch moves
929         the glyph -> path conversion into a helper class, GlyphToPathTranslator, and creates an implementation
930         for the SVG drawing code. Once this helper class is created, it can be used to trace paths in order
931         to make underlines skip over SVG glyphs. This helper class also has an implementation for non-SVG glyphs,
932         which allows for the glyph tracing code to be paramaterized over the implementation of the helper class
933         rather than if the FontData itself is SVG or not.
934
935         Tests: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-svg.html
936
937         * platform/graphics/Font.h:
938         (WebCore::GlyphToPathTranslator::~GlyphToPathTranslator): Virtual implementation of helper class
939         * platform/graphics/cg/PathCG.cpp:
940         (WebCore::Path::Path): Created constructor that takes a RefPtr<CGMutablePathRef>
941         * platform/graphics/Path.h:
942         * platform/graphics/TextRun.h: Give RenderingContext a factory function to create the helper class
943         instance
944         * platform/graphics/mac/FontMac.mm: Implementation of helper class used for skipping underlines on
945         regular (CoreText) glyphs
946         (WebCore::MacGlyphToPathTranslator::MacGlyphToPathTranslator):
947         (WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph):
948         (WebCore::MacGlyphToPathTranslator::incrementIndex):
949         (WebCore::Font::dashesForIntersectionsWithRect): Call the relevant factory function, and use it
950         to successively generate Paths
951         * rendering/svg/SVGTextRunRenderingContext.cpp: Implementation of helper class used for SVG fonts
952         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
953         (WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph):
954         (WebCore::SVGGlyphToPathTranslator::incrementIndex):
955         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
956         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Use the above implementation
957         * rendering/svg/SVGTextRunRenderingContext.h: Factory function declaration
958
959 2014-02-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
960
961         [WebRTC] Removing MediaConstraints argument from RTCPeerConnection addStream, updateIce methods and constructor
962         https://bugs.webkit.org/show_bug.cgi?id=129449
963
964         Reviewed by Eric Carlson.
965
966         According to WebRTC editor's draft, MediaConstraints will no longer be an argument of those methods and
967         constructor.
968
969         Existing tests were updated.
970
971         * Modules/mediastream/RTCPeerConnection.cpp:
972         (WebCore::RTCPeerConnection::create):
973         (WebCore::RTCPeerConnection::RTCPeerConnection):
974         (WebCore::RTCPeerConnection::updateIce):
975         (WebCore::RTCPeerConnection::addStream):
976         * Modules/mediastream/RTCPeerConnection.h:
977         * Modules/mediastream/RTCPeerConnection.idl:
978         * bindings/js/JSRTCPeerConnectionCustom.cpp:
979         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
980         * platform/mediastream/RTCPeerConnectionHandler.h:
981         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
982         (WebCore::RTCPeerConnectionHandlerMock::initialize):
983         (WebCore::RTCPeerConnectionHandlerMock::updateIce):
984         (WebCore::RTCPeerConnectionHandlerMock::addStream):
985         * platform/mock/RTCPeerConnectionHandlerMock.h:
986
987 2014-02-27  Radu Stavila  <stavila@adobe.com>
988
989         [CSS Regions] Move named-flow specific method decorationsClipRectForBoxInRegion to RenderNamedFlowThread
990         https://bugs.webkit.org/show_bug.cgi?id=129428
991
992         Reviewed by Andreas Kling.
993
994         Since the decorationsClipRectForBoxInRegion method is a named flow specific method, it makes
995         sense to be in the named flow specific class, RenderNamedFlowThread, instead of the more
996         generic RenderFlowThread.
997
998         No new tests required. No new functionality.
999
1000         * rendering/RenderBlock.cpp:
1001         (WebCore::RenderBlock::paintObject):
1002         * rendering/RenderFlowThread.cpp:
1003         * rendering/RenderFlowThread.h:
1004         * rendering/RenderNamedFlowThread.cpp:
1005         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
1006         * rendering/RenderNamedFlowThread.h:
1007
1008 2014-02-27  Zoltan Horvath  <zoltan@webkit.org>
1009
1010         Avoid calling logicalLeftOffsetForLine 2 times in LineWidth::fitBelowFloats
1011         https://bugs.webkit.org/show_bug.cgi?id=129433
1012
1013         Reviewed by Darin Adler.
1014
1015         This change updates fitBelowFloats and its helpers to call RenderBlock::logicalLeftOffsetForLine only once.
1016
1017         No new tests, no behavior change.
1018
1019         * rendering/line/LineWidth.cpp:
1020         (WebCore::availableWidthAtOffset):
1021         (WebCore::LineWidth::updateLineDimension):
1022         (WebCore::LineWidth::wrapNextToShapeOutside):
1023         (WebCore::LineWidth::fitBelowFloats):
1024         * rendering/line/LineWidth.h:
1025
1026 2014-02-27  Andreas Kling  <akling@apple.com>
1027
1028         Micro-optimize elementAffectsDirectionality().
1029         <https://webkit.org/b/129444>
1030
1031         Tweak this function to skip an unnecessary bit check and use
1032         fastHasAttribute() instead of hasAttribute() for looking up dirAttr.
1033
1034         ~1% speedup on DYEB/AngularJS.
1035
1036         Reviewed by Ryosuke Niwa.
1037
1038         * html/HTMLElement.cpp:
1039         (WebCore::elementAffectsDirectionality):
1040
1041 2014-02-27  Brian Burg  <bburg@apple.com>
1042
1043         Web Inspector: model tests should use a special Test.html inspector page
1044         https://bugs.webkit.org/show_bug.cgi?id=129190
1045
1046         Reviewed by Timothy Hatcher.
1047
1048         Convert InspectorController::isUnderTest() into a flag, and expose an
1049         Internals method so it can be set by the test before opening the inspector.
1050
1051         Test: inspector/test-harness-trivially-works.html
1052
1053         * inspector/InspectorController.cpp:
1054         (WebCore::InspectorController::evaluateForTestInFrontend):
1055         * inspector/InspectorController.h:
1056         * testing/Internals.cpp:
1057         (WebCore::Internals::setInspectorIsUnderTest): Added.
1058         * testing/Internals.h:
1059         * testing/Internals.idl:
1060
1061 2014-02-27  Joseph Pecoraro  <pecoraro@apple.com>
1062
1063         Unreviewed build fix after r164824.
1064
1065         Accidentally re-added some code that was removed.
1066
1067         * page/ContentSecurityPolicy.cpp:
1068
1069 2014-02-26  Alex Christensen  <achristensen@webkit.org>
1070
1071         Compile fix when not using TEXTURE_MAPPER_GL.
1072         https://bugs.webkit.org/show_bug.cgi?id=129417
1073
1074         Reviewed by Darin Adler.
1075
1076         * platform/graphics/texmap/TextureMapperGL.cpp:
1077         Protect platformCreateAccelerated with USE(TEXTURE_MAPPER_GL).
1078
1079 2014-02-27  Joseph Pecoraro  <pecoraro@apple.com>
1080
1081         Web Inspector: JSContext inspection should report exceptions in the console
1082         https://bugs.webkit.org/show_bug.cgi?id=128776
1083
1084         Reviewed by Timothy Hatcher.
1085
1086         Include some clean up of ConsoleMessage and ScriptCallStack construction.
1087
1088         Covered by existing tests.
1089
1090         * bindings/js/JSDOMBinding.cpp:
1091         (WebCore::reportException):
1092         Simplify code now that createStackTraceFromException handles it.
1093
1094         * page/ContentSecurityPolicy.cpp:
1095         (WebCore::gatherSecurityPolicyViolationEventData):
1096         (WebCore::ContentSecurityPolicy::reportViolation):
1097         ScriptCallStack can give us the first non-native callframe.
1098
1099         * inspector/InspectorResourceAgent.cpp:
1100         (WebCore::InspectorResourceAgent::buildInitiatorObject):
1101         * inspector/PageDebuggerAgent.cpp:
1102         (WebCore::PageDebuggerAgent::breakpointActionLog):
1103         * inspector/TimelineRecordFactory.cpp:
1104         (WebCore::TimelineRecordFactory::createGenericRecord):
1105         * page/Console.cpp:
1106         (WebCore::internalAddMessage):
1107         (WebCore::Console::profile):
1108         (WebCore::Console::profileEnd):
1109         (WebCore::Console::timeEnd):
1110         * page/ContentSecurityPolicy.cpp:
1111         (WebCore::gatherSecurityPolicyViolationEventData):
1112         (WebCore::ContentSecurityPolicy::reportViolation):
1113         * page/DOMWindow.cpp:
1114         (WebCore::DOMWindow::postMessage):
1115
1116 2014-02-27  Andreas Kling  <akling@apple.com>
1117
1118         Remove FeatureObserver.
1119         <https://webkit.org/b/129439>
1120
1121         This code was only used by the Chromium port and nobody else is
1122         making use of it.
1123
1124         Reviewed by Anders Carlsson.
1125
1126         * CMakeLists.txt:
1127         * GNUmakefile.list.am:
1128         * WebCore.vcxproj/WebCore.vcxproj:
1129         * WebCore.vcxproj/WebCore.vcxproj.filters:
1130         * WebCore.xcodeproj/project.pbxproj:
1131         * dom/EventTarget.cpp:
1132         (WebCore::EventTarget::fireEventListeners):
1133         * dom/EventTarget.h:
1134         * html/ColorInputType.cpp:
1135         * html/ColorInputType.h:
1136         * html/DateInputType.cpp:
1137         * html/DateInputType.h:
1138         * html/DateTimeInputType.cpp:
1139         * html/DateTimeInputType.h:
1140         * html/DateTimeLocalInputType.cpp:
1141         * html/DateTimeLocalInputType.h:
1142         * html/EmailInputType.cpp:
1143         * html/EmailInputType.h:
1144         * html/HTMLDataListElement.cpp:
1145         (WebCore::HTMLDataListElement::create):
1146         * html/HTMLFormControlElement.cpp:
1147         (WebCore::HTMLFormControlElement::parseAttribute):
1148         * html/HTMLInputElement.cpp:
1149         (WebCore::HTMLInputElement::parseAttribute):
1150         * html/HTMLTextFormControlElement.cpp:
1151         (WebCore::HTMLTextFormControlElement::parseAttribute):
1152         * html/InputType.cpp:
1153         * html/InputType.h:
1154         * html/MonthInputType.cpp:
1155         * html/MonthInputType.h:
1156         * html/NumberInputType.cpp:
1157         * html/NumberInputType.h:
1158         * html/RangeInputType.cpp:
1159         * html/RangeInputType.h:
1160         * html/SearchInputType.cpp:
1161         * html/SearchInputType.h:
1162         * html/TelephoneInputType.cpp:
1163         * html/TelephoneInputType.h:
1164         * html/TextInputType.cpp:
1165         * html/TextInputType.h:
1166         * html/TimeInputType.cpp:
1167         * html/TimeInputType.h:
1168         * html/URLInputType.cpp:
1169         * html/URLInputType.h:
1170         * html/WeekInputType.cpp:
1171         * html/WeekInputType.h:
1172         * loader/DocumentLoader.cpp:
1173         (WebCore::DocumentLoader::responseReceived):
1174         * loader/FrameLoader.cpp:
1175         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1176         (WebCore::FrameLoader::dispatchDidCommitLoad):
1177         * page/ContentSecurityPolicy.cpp:
1178         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1179         * page/EventHandler.cpp:
1180         (WebCore::EventHandler::selectCursor):
1181         * page/FeatureObserver.cpp: Removed.
1182         * page/FeatureObserver.h: Removed.
1183         * page/Page.h:
1184         * rendering/RenderDeprecatedFlexibleBox.cpp:
1185         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
1186         * rendering/RenderLayer.cpp:
1187         (WebCore::RenderLayer::calculateClipRects):
1188         * workers/SharedWorker.cpp:
1189         (WebCore::SharedWorker::create):
1190         * workers/Worker.cpp:
1191         (WebCore::Worker::create):
1192
1193 2014-02-27  Chris Fleizach  <cfleizach@apple.com>
1194
1195         speechSynthesis.speak of a zero length utterance kills future speech
1196         https://bugs.webkit.org/show_bug.cgi?id=129403
1197
1198         Reviewed by Mario Sanchez Prada.
1199
1200         Empty length strings may choke a synthesizer and result in didFinishSpeaking not being called. 
1201         The WebKit code should be proactive about screening out empty length strings.
1202
1203         Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak-empty-string.html
1204
1205         * Modules/speech/SpeechSynthesis.cpp:
1206         (WebCore::SpeechSynthesis::startSpeakingImmediately):
1207
1208 2014-02-27  Commit Queue  <commit-queue@webkit.org>
1209
1210         Unreviewed, rolling out r164783.
1211         http://trac.webkit.org/changeset/164783
1212         https://bugs.webkit.org/show_bug.cgi?id=129425
1213
1214         Broke number of multicol tests (Requested by anttik on
1215         #webkit).
1216
1217         * rendering/RenderBlock.cpp:
1218         (WebCore::RenderBlock::containingColumnsBlock):
1219
1220 2014-02-27  Antoine Quint  <graouts@webkit.org>
1221
1222         Respect SVG fragment identifiers in <img> src attribute
1223         https://bugs.webkit.org/show_bug.cgi?id=129387
1224
1225         Reviewed by Antti Koivisto.
1226
1227         Test: svg/css/svg-resource-fragment-identifier-img-src.html
1228
1229         When providing an SVG image for a given renderer, check that the URL used to load
1230         that image is taken into account in case it featured a fragment identifier, ensuring
1231         that the CSS :target pseudo-class is correctly handled for SVG resources. This patch
1232         is specific to <img> elements, specific support will also need to be added for various
1233         CSS properties that support SVG images.
1234
1235         * svg/graphics/SVGImageCache.cpp:
1236         (WebCore::SVGImageCache::imageForRenderer):
1237         Check if the provided renderer is attached to an <img> element and, if so, pass the
1238         resolved <img> source URL, taking into account srcset, to the SVGImageForContainer.
1239
1240         * svg/graphics/SVGImageForContainer.cpp:
1241         (WebCore::SVGImageForContainer::setURL):
1242         Trigger the FrameView machinery to ensure that the :target pseudo-class is respected
1243         should the provided URL feature a fragment identifier.
1244
1245         * svg/graphics/SVGImageForContainer.h:
1246         Declare the new setURL() method.
1247
1248 2014-02-27  Krzysztof Czech  <k.czech@samsung.com>
1249
1250         [ATK] Fix style errors in enum members
1251         https://bugs.webkit.org/show_bug.cgi?id=129421
1252
1253         Reviewed by Mario Sanchez Prada.
1254
1255         No new tests. No new functionality.
1256
1257         Enum members should use InterCaps with an initial capital letter.
1258
1259         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1260         (getInterfaceMaskFromObject):
1261
1262 2014-02-27  Mihai Tica  <mitica@adobe.com>
1263
1264         [CSS Blending] Parse and implement the -webkit-isolation CSS property.
1265
1266         https://bugs.webkit.org/show_bug.cgi?id=128958
1267
1268         Reviewed by Dirk Schulze.
1269
1270         Parse and implement -webkit-isolation, part of the CSS Blending and Compositing spec.
1271         This patch adds functionality for HTML and SVG.
1272         -webkit-isolation: isolate restricts any child elements from blending with any of the content outside the isolated parent element.
1273
1274         Tests: css3/compositing/isolation-isolate-blended-child.html
1275                css3/compositing/isolation-parsing.html
1276                css3/compositing/svg-isolation-default.html
1277                css3/compositing/svg-isolation-isolated-group.html
1278                css3/compositing/svg-isolation-simple.html
1279
1280         * css/CSSComputedStyleDeclaration.cpp:
1281         (WebCore::ComputedStyleExtractor::propertyValue):
1282         * css/CSSParser.cpp:
1283         (WebCore::isValidKeywordPropertyAndValue):
1284         (WebCore::isKeywordPropertyID):
1285         (WebCore::CSSParser::parseValue):
1286         * css/CSSPrimitiveValueMappings.h:
1287         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1288         (WebCore::CSSPrimitiveValue::operator Isolation):
1289         * css/CSSPropertyNames.in: Add -webkit-isolation.
1290         * css/CSSValueKeywords.in: Add the isolate value.
1291         * css/DeprecatedStyleBuilder.cpp:
1292         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1293         * css/StyleResolver.cpp:
1294         (WebCore::StyleResolver::adjustRenderStyle): Explicitly set isolation:isolate to create a stacking context.
1295         * rendering/style/RenderStyle.cpp:
1296         (WebCore::RenderStyle::changeRequiresLayerRepaint): Changing isolation should trigger a repaint.
1297         * rendering/style/RenderStyle.h: Setters and getters for isolation.
1298         * rendering/style/RenderStyleConstants.h: Add Isolation enum.
1299         * rendering/style/StyleRareNonInheritedData.cpp: Add m_isolation.
1300         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1301         (WebCore::StyleRareNonInheritedData::operator==):
1302         * rendering/style/StyleRareNonInheritedData.h:
1303         * rendering/svg/SVGRenderingContext.cpp:
1304         (WebCore::SVGRenderingContext::prepareToRenderSVGContent): If isolated, paint in a transparency layer.
1305
1306 2014-02-27  Krzysztof Czech  <k.czech@samsung.com>
1307
1308         [ATK] Utilize AtkTableCell to expose directly AccessibilityTableCell to AT
1309         https://bugs.webkit.org/show_bug.cgi?id=129250
1310
1311         Reviewed by Mario Sanchez Prada.
1312
1313         Test: accessibility/table-scope.html
1314
1315         Exposing AtkTableCell to AT. Implementing possibility to get column headers and row headers
1316         as an array of cells.
1317
1318         * GNUmakefile.list.am:
1319         * PlatformEfl.cmake:
1320         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp: Added.
1321         (convertToGPtrArray):
1322         (core):
1323         (webkitAccessibleTableCellGetColumnHeaderCells):
1324         (webkitAccessibleTableCellGetRowHeaderCells):
1325         (webkitAccessibleTableCellInterfaceInit):
1326         * accessibility/atk/WebKitAccessibleInterfaceTableCell.h: Added.
1327         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1328         (getInterfaceMaskFromObject):
1329
1330 2014-02-27  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
1331
1332         Improving containing column block determination
1333         https://bugs.webkit.org/show_bug.cgi?id=125449
1334
1335         Reviewed by Darin Adler.
1336
1337         Making sure that the containing column block of any elements
1338         can not be oneself.
1339
1340         Test: fast/css/crash-on-column-splitting.html
1341
1342         * rendering/RenderBlock.cpp:
1343         (WebCore::RenderBlock::containingColumnsBlock):
1344         (WebCore::RenderBlock::splitFlow):
1345
1346 2014-02-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1347
1348         [GTK] Improve JavaScript multimedia controls
1349         https://bugs.webkit.org/show_bug.cgi?id=129044
1350
1351         Reviewed by Jer Noble.
1352
1353         After webkit.org/b/123097 a follow up was needed to improve
1354         accessibily and some other cosmetic problems, like cleaner CSS and
1355         new missing baselines.
1356
1357         No new tests because of no new functionality.
1358
1359         * Modules/mediacontrols/mediaControlsApple.js:
1360         Added hiding class name.
1361         * Modules/mediacontrols/mediaControlsGtk.js:
1362         (ControllerGtk.prototype.createControls): Set remaining time as
1363         hidden by default and turned volumebox hidden into hiding.
1364         (ControllerGtk.prototype.updateTime): Simplified the hiding and
1365         showing by removing the show class and using hidden only.
1366         (ControllerGtk.prototype.handleMuteButtonMouseOver):
1367         (ControllerGtk.prototype.handleVolumeBoxMouseOut): Turned hidden
1368         into hiding.
1369         (ControllerGtk.prototype.updateReadyState): Changed coding style
1370         and added down class for the panel too.
1371         (ControllerGtk.prototype.updatePlaying): Change for coding style
1372         coherence.
1373         (ControllerGtk.prototype.handleCaptionButtonClicked): Call
1374         handleCaptionButtonShowMenu.
1375         (ControllerGtk.prototype.handleCaptionButtonMouseOver): Call
1376         handleCaptionButtonShowMenu.
1377         (ControllerGtk.prototype.handleCaptionButtonShowMenu): Created
1378         with the former behavior of handleCaptionButtonMouseOver.
1379         * css/mediaControlsGtk.css:
1380         (.hidden): Set display none for all objects with hidden class.
1381         (audio::-webkit-media-controls-panel *:focus):
1382         (audio::-webkit-media-controls-panel.down *:focus): Added gradient
1383         for the active and focus status.
1384         (audio::-webkit-media-controls-time-remaining-display)
1385         (video::-webkit-media-controls-time-remaining-display): Set
1386         display block.
1387         (audio::-webkit-media-controls-volume-slider-container)
1388         (video::-webkit-media-controls-volume-slider-container): Set
1389         display flex.
1390         (video::-webkit-media-controls-volume-slider-container.hiding):
1391         Changed from hidden.
1392         (video::-webkit-media-controls-panel .hiding.down): Changed from
1393         hidden.
1394         * platform/gtk/RenderThemeGtk.cpp:
1395         (WebCore::RenderThemeGtk::paintMediaButton): Returning true to
1396         allow CSS painting the gradient.
1397
1398 2014-02-27  Zan Dobersek  <zdobersek@igalia.com>
1399
1400         Unreviewed. Fixing the GTK build fix after r164757.
1401
1402         * platform/network/NetworkStateNotifier.cpp: r164757 introduced a layering violation by including
1403         the Settings.h header. The use of that class is guarded by PLATFORM(IOS), so the header inclusion
1404         should be guarded as well.
1405
1406 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
1407
1408         Extract named items caches in HTMLCollection as a class
1409         https://bugs.webkit.org/show_bug.cgi?id=129365
1410
1411         Reviewed by Antti Koivisto.
1412
1413         Extracted CollectionNamedElementCache, like CollectionIndexCache, out of HTMLCollection.
1414         We can move more named item related functions into this class in the future.
1415
1416         HTMLCollection's member variables m_isNameCacheValid, m_idCache, and m_nameCache were replaced by
1417         a single unique_ptr that holds an instance of CollectionNamedElementCache since this object rarely
1418         exists in most HTMLCollections.
1419
1420         Also removed m_isItemRefElementsCacheValid since it was only used by Microdata API removed in r153772
1421         and renamed a whole bunch of member functions and variables for consistency.
1422
1423         * dom/Document.cpp:
1424         (WebCore::Document::collectionCachedIdNameMap):
1425         (WebCore::Document::collectionWillClearIdNameMap):
1426         * dom/Document.h:
1427         * dom/NodeRareData.h:
1428         (WebCore::NodeListsNodeData::adoptDocument):
1429         * html/HTMLAllCollection.cpp:
1430         (WebCore::HTMLAllCollection::namedItemWithIndex):
1431         * html/HTMLCollection.cpp:
1432         (WebCore::HTMLCollection::HTMLCollection):
1433         (WebCore::HTMLCollection::~HTMLCollection):
1434         (WebCore::HTMLCollection::invalidateCache):
1435         (WebCore::HTMLCollection::invalidateNamedElementCache): Renamed from invalidateIdNameCacheMaps.
1436         (WebCore::HTMLCollection::namedItem):
1437         (WebCore::HTMLCollection::updateNamedElementCache): Renamed from updateNameCache.
1438         (WebCore::HTMLCollection::namedItems):
1439
1440         * html/HTMLCollection.h:
1441         (WebCore::CollectionNamedElementCache::findElementsWithId): Renamed from HTMLCollection::idCache.
1442         (WebCore::CollectionNamedElementCache::findElementsWithName): Renamed from HTMLCollection::nameCache.
1443         (WebCore::CollectionNamedElementCache::appendIdCache): Moved from HTMLCollection.
1444         (WebCore::CollectionNamedElementCache::appendNameCache): Ditto.
1445         (WebCore::CollectionNamedElementCache::find): Ditto.
1446         (WebCore::CollectionNamedElementCache::append): Ditto.
1447
1448         (WebCore::HTMLCollection::invalidateCache):
1449         (WebCore::HTMLCollection::hasNamedElementCache): Renamed from hasIdNameCache.
1450         (WebCore::HTMLCollection::createNameItemCache): Added.
1451         (WebCore::HTMLCollection::namedItemCaches): Added.
1452
1453         * html/HTMLFormControlsCollection.cpp:
1454         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
1455         * html/HTMLFormControlsCollection.h:
1456
1457 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
1458
1459         Indenting an indented image element resulted in an extra indentation
1460         https://bugs.webkit.org/show_bug.cgi?id=129201
1461
1462         Reviewed by Enrica Casucci.
1463
1464         The bug was caused by endOfParagraph returning a position at the beginning of a block when the position
1465         passed into the function was at the beginning of the block. Consider the following DOM:
1466         <blockquote><img></blockquote>
1467
1468         When endOfParagraph is called on (blockquote, 0), the condition r->isBR() || isBlock(n) in endOfParagraph
1469         matches immediately on startNode and it returns (blockquote, 0) again.
1470
1471         This resulted in moveParagraphWithClones invoked by indentIntoBlockquote to erroneously clone the inner
1472         blockquote. Worked around this bug in ApplyBlockElementCommand::formatSelection by checking this specific
1473         condition and moving the position to the end of the block. Unfortunately, a lot of existing code depends
1474         on the current behavior of endOfParagraph so fixing the function itself was not possible.
1475
1476         There was another bug in indentIntoBlockquote to incorrectly insert a new blockquote into the existing
1477         blockquote due to the code introduced in r99594 to avoid inserting before the root editable element.
1478         Since this happens only if outerBlock is the root editable element, which is nodeToSplitTo or an ancestor
1479         of nodeToSplitTo, explicitly look for this condition.
1480
1481         Test: editing/execCommand/indent-img-twice.html
1482
1483         * editing/ApplyBlockElementCommand.cpp:
1484         (WebCore::ApplyBlockElementCommand::formatSelection):
1485         (WebCore::isNewLineAtPosition):
1486         * editing/IndentOutdentCommand.cpp:
1487         (WebCore::IndentOutdentCommand::indentIntoBlockquote):
1488         * editing/VisibleUnits.cpp:
1489         (WebCore::endOfParagraph): Added a FIXME.
1490
1491 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
1492
1493         Fix two assertions/crashes in compositing code
1494         https://bugs.webkit.org/show_bug.cgi?id=129414
1495
1496         Reviewed by Dean Jackson.
1497
1498         Fix two issues introduced in r164759.
1499
1500         * rendering/RenderLayerCompositor.cpp:
1501         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers): Don't call
1502         ourselves recursively!
1503         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): We call this
1504         function unconditionally on layer teardown, so this assertion is bogus.
1505
1506 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
1507
1508         Fix the build with some compiler configurations.
1509
1510         * platform/mac/ScrollAnimatorMac.mm:
1511         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1512         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
1513         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
1514
1515 2014-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
1516
1517         Ranges given to createMarkupInternal might not be canonicalized
1518         https://bugs.webkit.org/show_bug.cgi?id=129408
1519
1520         Reviewed by Ryosuke Niwa.
1521
1522         When WebKit clients (such as Mail) call WKWebArchiveCreateFromRange() with a range,
1523         that range is not necessarily canonicalized. Therefore, comparing it for equality
1524         with a canonicalized range might return a false negative. Instead, we should compare
1525         canonicalized ranges.
1526
1527         No new tests because this codepath will only be reached via SPI.
1528
1529         * editing/markup.cpp:
1530         (WebCore::createMarkupInternal):
1531
1532 2014-02-26  Enrica Casucci  <enrica@apple.com>
1533
1534         [iOS WebKit2] Form controls handling: implement date and time controls.
1535         https://bugs.webkit.org/show_bug.cgi?id=129344
1536
1537         Reviewed by Simon Fraser and Joseph Pecoraro.
1538
1539         Adding one localizable string.
1540
1541         * English.lproj/Localizable.strings:
1542
1543 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
1544
1545         Prepare for overflow scrolling nodes in the scrolling tree
1546         https://bugs.webkit.org/show_bug.cgi?id=129398
1547
1548         Reviewed by Tim Horton.
1549
1550         Lay some groundwork for overflow:scrolling nodes in the scrolling tree.
1551         Change terminology to refer to "scroll-coordinatored" layers now, not just viewport-constrained
1552         layers.
1553         
1554         A given layer can be both viewport-constrained and overflow-scrolling (e.g. position:fixed,
1555         overflow:scroll), so handle that in RenderLayerBacking, and use some "reason" flags
1556         in RenderLayerCompositor.
1557
1558         * page/FrameView.cpp:
1559         (WebCore::FrameView::scrollLayerID): Rename
1560         * page/scrolling/ScrollingStateTree.cpp:
1561         (WebCore::ScrollingStateTree::attachNode): Remove invalid assertion.
1562         * rendering/RenderLayerBacking.cpp:
1563         (WebCore::RenderLayerBacking::RenderLayerBacking):
1564         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1565         (WebCore::RenderLayerBacking::updateScrollingLayers): Simplify the logic with
1566         an early return.
1567         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
1568         Allow a layer to play both viewport-constrained and scrolling roles
1569         in the scrolling tree.
1570         * rendering/RenderLayerBacking.h:
1571         (WebCore::RenderLayerBacking::viewportConstrainedNodeID):
1572         (WebCore::RenderLayerBacking::setViewportConstrainedNodeID):
1573         (WebCore::RenderLayerBacking::scrollingNodeID):
1574         (WebCore::RenderLayerBacking::setScrollingNodeID):
1575         (WebCore::RenderLayerBacking::scrollingNodeIDForChildren):
1576         * rendering/RenderLayerCompositor.cpp:
1577         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1578         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
1579         (WebCore::RenderLayerCompositor::updateBacking):
1580         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1581         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged):
1582         (WebCore::RenderLayerCompositor::clearBackingForLayerIncludingDescendants):
1583         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
1584         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
1585         (WebCore::RenderLayerCompositor::reasonsForCompositing):
1586         (WebCore::RenderLayerCompositor::requiresCompositingForScrolling):
1587         (WebCore::isViewportConstrainedFixedOrStickyLayer):
1588         (WebCore::isMainFrameScrollingOrOverflowScrolling):
1589         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
1590         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
1591         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
1592         (WebCore::nearestScrollCoordinatedAncestor):
1593         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1594         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
1595         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
1596         (WebCore::RenderLayerCompositor::willRemoveScrollingLayer):
1597         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
1598         * rendering/RenderLayerCompositor.h:
1599
1600 2014-02-26  Andy Estes  <aestes@apple.com>
1601
1602         [iOS] Support network state notification using CPNetworkObserver
1603         https://bugs.webkit.org/show_bug.cgi?id=129358
1604
1605         Reviewed by Dan Bernstein.
1606
1607         Add iOS support for navigator.onLine and online/offline events. Since
1608         it can be expensive to query CPNetworkObserver, wait to do so until
1609         someone calls NetworkStateObserver::onLine() or
1610         NetworkStateObserver::addNetworkStateChangeListener(). For clients that
1611         don't wish to observe network reachability at all, add a global opt-out.
1612         These clients will only pay the cost of CPNetworkObserver if they load
1613         a page that explicitly accesses navigator.onLine.
1614
1615         No new tests. Covered by existing tests.
1616
1617         * WebCore.exp.in: Stopped exporting NetworkStateNotifier::setIsOnLine()
1618         and started exporting Settings::gShouldOptOutOfNetworkStateObservation.
1619         * WebCore.xcodeproj/project.pbxproj: Renamed NetworkStateNotifierIOS.cpp
1620         to NetworkStateNotifierIOS.mm.
1621         * page/Settings.cpp: Defaulted gShouldOptOutOfNetworkStateObservation
1622         to false.
1623         * page/Settings.h:
1624         (WebCore::Settings::setShouldOptOutOfNetworkStateObservation):
1625         (WebCore::Settings::shouldOptOutOfNetworkStateObservation):
1626         * platform/network/NetworkStateNotifier.cpp:
1627         (WebCore::NetworkStateNotifier::addNetworkStateChangeListener): Ignored
1628         the listener if Settings::shouldOptOutOfNetworkStateObservation().
1629         Called registerObserverIfNecessary() and added the listener otherwise.
1630         (WebCore::NetworkStateNotifier::notifyNetworkStateChange): Const qualified.
1631         * platform/network/NetworkStateNotifier.h
1632         (NetworkStateNotifier::onLine):
1633         * platform/network/ios/NetworkStateNotifierIOS.cpp: Removed.
1634         * platform/network/ios/NetworkStateNotifierIOS.mm: Added.
1635         (-[NetworkStateObserver initWithNotifier:WebCore::]): Registered self
1636         as a network reachable observer on CPNetworkObserver.
1637         (-[NetworkStateObserver dealloc]): Removed self as a network reachable
1638         observer.
1639         (-[NetworkStateObserver networkStateChanged:]): Called setOnLine() on
1640         the web thread, passing the reachability value from the notification.
1641         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1642         (WebCore::NetworkStateNotifier::~NetworkStateNotifier): Cleared
1643         m_observer's pointer back to us.
1644         (WebCore::NetworkStateNotifier::registerObserverIfNecessary): Initialized
1645         m_observer if necessary.
1646         (WebCore::NetworkStateNotifier::onLine): Called
1647         registerObserverIfNecessary() and set an initial value for m_isOnLine
1648         if m_isOnLineInitialized is false. Returned m_isOnLine.
1649         (WebCore::setOnLine): Set m_isOnLine and called
1650         notifyNetworkStateChange() if needed. Unconditionally set
1651         m_isOnLineInitialized to true.
1652
1653 2014-02-26  Brian Burg  <bburg@apple.com>
1654
1655         Unreviewed build fix for !ENABLE(CONTEXT_MENUS).
1656
1657         I forgot to add guards to handleContextMenuEvent().
1658
1659         * replay/UserInputBridge.cpp:
1660         * replay/UserInputBridge.h:
1661
1662 2014-02-26  Dean Jackson  <dino@apple.com>
1663
1664         [WebGL] Only skip context error retrieval if a pending context
1665         https://bugs.webkit.org/show_bug.cgi?id=129397
1666
1667         Reviewed by Tim Horton.
1668
1669         A lost context should still ask the GC3D what the error is. Only
1670         a pending context should return early.
1671
1672         * html/canvas/WebGLRenderingContext.cpp:
1673         (WebCore::WebGLRenderingContext::getError):
1674
1675 2014-02-26  Brian Burg  <bburg@apple.com>
1676
1677         Web Replay: route through UserInputBridge when delivering user inputs to WebCore
1678         https://bugs.webkit.org/show_bug.cgi?id=128150
1679
1680         Reviewed by Timothy Hatcher.
1681
1682         Add an UserInputBridge instance to each Page. WebKit2 routes a page's user inputs through
1683         the WebCore page's user input bridge so that the inputs can be selectively captured, filtered,
1684         and replayed using instrumentation inside the UserInputBridge.
1685
1686         For now, the routing methods of UserInputBridge have no replay-specific code paths, and just
1687         put the input delivery code inside WebCore rather than its external clients. Replay-specific
1688         code paths will be added once https://bugs.webkit.org/show_bug.cgi?id=128782 is fixed. However,
1689         once complete the code will work as follows:
1690
1691         - When neither capturing or replaying, behavior is unchanged.
1692
1693         - When capturing user inputs, each external input is saved into a replay log as it crosses
1694         the bridge from outside WebCore.
1695
1696         - When replaying, the bridge closes and user inputs from WebKit2 are not accepted. Instead,
1697         the saved inputs from the replay log are re-dispatched as if they had crossed the bridge.
1698
1699         * CMakeLists.txt:
1700         * GNUmakefile.am:
1701         * GNUmakefile.list.am:
1702         * WebCore.exp.in: Add symbols for input routing methods.
1703         * WebCore.vcxproj/WebCore.vcxproj:
1704         * WebCore.vcxproj/WebCore.vcxproj.filters:
1705         * WebCore.xcodeproj/project.pbxproj:
1706         * page/Page.cpp:
1707         (WebCore::Page::Page): Initialize the owned UserInputBridge in the Page constructor.
1708         * page/Page.h:
1709         (WebCore::Page::inputBridge): Added a by-reference getter.
1710         * replay/UserInputBridge.cpp: Added.
1711         (WebCore::UserInputBridge::UserInputBridge):
1712         (WebCore::UserInputBridge::~UserInputBridge):
1713         (WebCore::UserInputBridge::handleContextMenuEvent):
1714         (WebCore::UserInputBridge::handleMousePressEvent):
1715         (WebCore::UserInputBridge::handleMouseReleaseEvent):
1716         (WebCore::UserInputBridge::handleMouseMoveEvent):
1717         (WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
1718         (WebCore::UserInputBridge::handleKeyEvent):
1719         (WebCore::UserInputBridge::handleAccessKeyEvent):
1720         (WebCore::UserInputBridge::handleWheelEvent):
1721         (WebCore::UserInputBridge::focusSetActive):
1722         (WebCore::UserInputBridge::focusSetFocused):
1723         (WebCore::UserInputBridge::scrollRecursively):
1724         (WebCore::UserInputBridge::logicalScrollRecursively):
1725         (WebCore::UserInputBridge::loadRequest):
1726         (WebCore::UserInputBridge::reloadFrame):
1727         (WebCore::UserInputBridge::stopLoadingFrame):
1728         (WebCore::UserInputBridge::tryClosePage):
1729         * replay/UserInputBridge.h: Added.
1730
1731 2014-02-26  Dean Jackson  <dino@apple.com>
1732
1733         [WebGL] Protect more WebGL entry points for pending contexts
1734         https://bugs.webkit.org/show_bug.cgi?id=129386
1735
1736         Reviewed by Tim Horton.
1737
1738         There are entry points into a WebGLRenderingContext that don't
1739         come from the web-exposed API directly, such as drawImage with
1740         the WebGL canvas. Protect these by returning early if we're
1741         a pending context.
1742
1743         Also a bunch of drive-by 0 -> nullptr changes.
1744
1745         * html/canvas/WebGLRenderingContext.cpp:
1746         (WebCore::WebGLRenderingContext::markLayerComposited):
1747         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
1748         (WebCore::WebGLRenderingContext::paintRenderingResultsToImageData):
1749         (WebCore::WebGLRenderingContext::reshape):
1750         (WebCore::WebGLRenderingContext::createBuffer):
1751         (WebCore::WebGLRenderingContext::createFramebuffer):
1752         (WebCore::WebGLRenderingContext::createTexture):
1753         (WebCore::WebGLRenderingContext::createProgram):
1754         (WebCore::WebGLRenderingContext::createRenderbuffer):
1755         (WebCore::WebGLRenderingContext::createShader):
1756         (WebCore::WebGLRenderingContext::getActiveAttrib):
1757         (WebCore::WebGLRenderingContext::getActiveUniform):
1758         (WebCore::WebGLRenderingContext::getContextAttributes):
1759         (WebCore::WebGLRenderingContext::getError):
1760         (WebCore::WebGLRenderingContext::getExtension):
1761         (WebCore::WebGLRenderingContext::getShaderPrecisionFormat):
1762         (WebCore::WebGLRenderingContext::getUniformLocation):
1763         (WebCore::WebGLRenderingContext::drawImageIntoBuffer):
1764         (WebCore::WebGLRenderingContext::videoFrameToImage):
1765         (WebCore::WebGLRenderingContext::validateBufferDataParameters):
1766         (WebCore::WebGLRenderingContext::LRUImageBufferCache::imageBuffer):
1767
1768 2014-02-26  Bem Jones-Bey  <bjonesbe@adobe.com>
1769
1770         [CSS Shapes] inset and inset-rectangle trigger assert with replaced element and large percentage dimension
1771         https://bugs.webkit.org/show_bug.cgi?id=129060
1772
1773         Reviewed by Simon Fraser.
1774
1775         A bounds check was omitted when computing the width and height for inset
1776         rectangles, making it possible for the width or height to end up being
1777         negative. This patch adds in that check for both. It seems that only
1778         replaced elements like iframe and img trigger this problem.
1779
1780         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-img-inset-negative-width-crash.html
1781                fast/shapes/shape-outside-floats/shape-outside-floats-img-inset-rectangle-negative-width-crash.html
1782
1783         * rendering/shapes/Shape.cpp:
1784         (WebCore::Shape::createShape):
1785
1786 2014-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
1787
1788         Underlines are too thick when zoomed in
1789         https://bugs.webkit.org/show_bug.cgi?id=129352
1790
1791         Reviewed by Dean Jackson.
1792
1793         The input to the underline drawing code is in user-space, not device-space.
1794         The underlines were getting scaled twice, once in InlineTextBox and the other
1795         in GraphicsContext.
1796
1797         Test: fast/css3-text/css3-text-decoration/text-decoration-scaled.html
1798
1799         * rendering/InlineTextBox.cpp:
1800         (WebCore::InlineTextBox::paintDecoration):
1801
1802 2014-02-26  Andreas Kling  <akling@apple.com>
1803
1804         Remove unused InspectorCounters.
1805         <https://webkit.org/b/129367>
1806
1807         The InspectorCounters code was only used to implement two layout test
1808         APIs (window.internals.numberOfLive{Nodes,Documents}) yet it had hooks
1809         in crazy places like Node construction and destruction.
1810
1811         Rewrote the internals APIs to iterate over all live Documents instead,
1812         totaling up their referencing Node count. Added a process-global
1813         Document::allDocuments() HashSet to make this whole thing possible.
1814
1815         Reviewed by Sam Weinig.
1816
1817         * CMakeLists.txt:
1818         * GNUmakefile.list.am:
1819         * WebCore.exp.in:
1820         * WebCore.vcxproj/WebCore.vcxproj:
1821         * WebCore.vcxproj/WebCore.vcxproj.filters:
1822         * WebCore.xcodeproj/project.pbxproj:
1823         * bindings/js/JSEventListener.cpp:
1824         * dom/Document.cpp:
1825         (WebCore::Document::allDocuments):
1826         (WebCore::Document::Document):
1827         (WebCore::Document::~Document):
1828         * dom/Document.h:
1829         (WebCore::Node::Node):
1830         * dom/Node.cpp:
1831         (WebCore::Node::~Node):
1832         * inspector/InspectorAllInOne.cpp:
1833         * inspector/InspectorCounters.cpp: Removed.
1834         * inspector/InspectorCounters.h: Removed.
1835         * inspector/InspectorTimelineAgent.cpp:
1836         (WebCore::InspectorTimelineAgent::start):
1837         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1838         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1839         * inspector/InspectorTimelineAgent.h:
1840         * inspector/protocol/Timeline.json:
1841         * platform/ThreadGlobalData.cpp:
1842         * testing/Internals.cpp:
1843         (WebCore::Internals::numberOfLiveNodes):
1844         (WebCore::Internals::numberOfLiveDocuments):
1845         * testing/Internals.h:
1846         * testing/Internals.idl:
1847
1848 2014-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1849
1850         Web Inspector: Remove console.profiles from window.console API
1851         https://bugs.webkit.org/show_bug.cgi?id=116883
1852
1853         Reviewed by Timothy Hatcher.
1854
1855         console.profiles has been removed or never implemented by other
1856         browsers. We should remove it as well. However, since tests
1857         rely on it, keep it as window.internals.consoleProfiles.
1858
1859         * WebCore.exp.in:
1860         * page/Console.idl:
1861         * testing/Internals.cpp:
1862         (WebCore::Internals::consoleProfiles):
1863         * testing/Internals.h:
1864         * testing/Internals.idl:
1865
1866 2014-02-26  Martin Hock  <mhock@apple.com>
1867
1868         Create SessionID value-style class for session IDs.
1869         https://bugs.webkit.org/show_bug.cgi?id=129141
1870
1871         Reviewed by Sam Weinig.
1872
1873         * GNUmakefile.list.am:
1874         * WebCore.exp.in:
1875         * WebCore.xcodeproj/project.pbxproj:
1876         * page/Page.cpp: Add SessionID member.
1877         (WebCore::Page::Page):
1878         (WebCore::Page::sessionID): Retrieve sessionID or use settings if not set.
1879         * page/Page.h:
1880         (WebCore::Page::isSessionIDSet):
1881         (WebCore::Page::setSessionID):
1882         * page/SessionID.h: Session ID class consisting solely of its uint64_t session ID.
1883         (WebCore::SessionID::SessionID):
1884         (WebCore::SessionID::isValid): Not empty.
1885         (WebCore::SessionID::isEphemeral):
1886         (WebCore::SessionID::sessionID):
1887         (WebCore::SessionID::operator==): Value-based equality.
1888         (WebCore::SessionID::operator!=):
1889         (WebCore::SessionID::emptySessionID): Zero value also used for HashTraits emptyValue.
1890         (WebCore::SessionID::defaultSessionID):
1891         (WebCore::SessionID::legacyPrivateSessionID):
1892         * page/SessionIDHash.h:
1893         (WTF::SessionIDHash::hash): Just the casted session ID (low order bytes)
1894         (WTF::SessionIDHash::equal):
1895         (WTF::HashTraits<WebCore::SessionID>::emptyValue): Equal to emptySessionID.
1896         (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): -1 value.
1897         (WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
1898
1899 2014-02-26  Eric Carlson  <eric.carlson@apple.com>
1900
1901         Fix builds that don't define IMAGE_CONTROLS.
1902
1903         * page/ContextMenuContext.cpp:
1904         (WebCore::ContextMenuContext::ContextMenuContext):
1905
1906 2014-02-26  Eric Carlson  <eric.carlson@apple.com>
1907
1908         Build fix for OS X after r164720.
1909
1910         * page/ContextMenuContext.cpp:
1911
1912 2014-02-26  Brady Eidson  <beidson@apple.com>
1913
1914         Pipe experimental image controls menu up to WebKit2
1915         https://bugs.webkit.org/show_bug.cgi?id=129339
1916
1917         Reviewed by Simon Fraser.
1918
1919         Handle events for the image control, starting down the context menu code path if appropriate:
1920         * html/shadow/mac/ImageControlsRootElementMac.cpp:
1921         (WebCore::ImageControlsRootElementMac::defaultEventHandler):
1922         * html/shadow/mac/ImageControlsRootElementMac.h:
1923
1924         Add a class to hold a HitTestResult and addition info about the current ContextMenu invocation:
1925         * page/ContextMenuContext.cpp: Added.
1926         (WebCore::ContextMenuContext::ContextMenuContext):
1927         * page/ContextMenuContext.h: Added.
1928         (WebCore::ContextMenuContext::hitTestResult):
1929         (WebCore::ContextMenuContext::isImageControl):
1930
1931         Update ContextMenuController to work with ContextMenuContext instead of HitTestResult directly:
1932         * page/ContextMenuController.cpp:
1933         (WebCore::ContextMenuController::showContextMenu):
1934         (WebCore::ContextMenuController::createContextMenu):
1935         (WebCore::ContextMenuController::contextMenuItemSelected):
1936         (WebCore::ContextMenuController::populate):
1937         (WebCore::ContextMenuController::addInspectElementItem):
1938         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1939         (WebCore::ContextMenuController::showImageControlsMenu):
1940         * page/ContextMenuController.h:
1941         (WebCore::ContextMenuController::contextMenu):
1942         (WebCore::ContextMenuController::setContextMenuContext):
1943         (WebCore::ContextMenuController::context):
1944         (WebCore::ContextMenuController::hitTestResult):
1945
1946         * CMakeLists.txt:
1947         * GNUmakefile.list.am:
1948         * WebCore.vcxproj/WebCore.vcxproj:
1949         * WebCore.xcodeproj/project.pbxproj:
1950
1951 2014-02-26  Zan Dobersek  <zdobersek@igalia.com>
1952
1953         REGRESSION(r162947): Document::topDocument() returns an incorrect reference for cached Documents
1954         https://bugs.webkit.org/show_bug.cgi?id=128175
1955
1956         Reviewed by Antti Koivisto.
1957
1958         * dom/Document.cpp:
1959         (WebCore::Document::topDocument): Fall back to pre-r162947 way of determining the top document
1960         when the Document is in page cache or is in the middle of having its render tree destroyed.
1961         In the first case, the determined top document is actually the document currently loaded in the
1962         Frame to which the cached document is still connected, which is obviously not desired. In the
1963         second case the top document is similarly incorrectly deduced, leading to non-deletion of the
1964         proper top document's AXObjectCache. Because of this AccessibilityRenderObjects are not detached
1965         which results in assertions in RenderObject destructor where the objects are found to be still
1966         flagged as in use by the AX cache.
1967
1968 2014-02-26  Mihnea Ovidenie  <mihnea@adobe.com>
1969
1970         [CSSRegions] Remove unused method RenderFlowThread::updateLayerToRegionMappings()
1971         https://bugs.webkit.org/show_bug.cgi?id=129368
1972
1973         Reviewed by Andrei Bucur.
1974
1975         Remove unused code, no new tests.
1976
1977         * rendering/RenderFlowThread.h:
1978
1979 2014-02-26  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1980
1981         [GTK] Regression when showing the captions menu
1982         https://bugs.webkit.org/show_bug.cgi?id=129106
1983
1984         Reviewed by Martin Robinson.
1985
1986         In some cases, when clicking the captions button the menu was not
1987         shown.
1988
1989         Updated test: media/video-controls-captions-trackmenu.html
1990
1991         * Modules/mediacontrols/mediaControlsGtk.js:
1992         (ControllerGtk.prototype.buildCaptionMenu):
1993         (ControllerGtk.prototype.showCaptionMenu): Specify sizes in
1994         pixels.
1995
1996 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
1997
1998         Avoid unnecessary HTML Collection invalidations for id and name attribute changes
1999         https://bugs.webkit.org/show_bug.cgi?id=129361
2000
2001         Reviewed by Benjamin Poulain.
2002
2003         Before this patch, setting id and name attributes resulted in traversing all the ancestors to invalidate
2004         HTML collections on those nodes whenever we had more than one HTMLCollection alive.
2005
2006         Avoid the traversal when HTMLCollections don't have any valid id and name map caches by making each
2007         HTMLCollection explicitly call collectionCachedIdNameMap and collectionWillClearIdNameMap when it caches
2008         or clears the id and name map.
2009
2010         Inspired by https://chromium.googlesource.com/chromium/blink/+/5b06b91b79098f7d42e480f85be32198315d2440
2011
2012         * dom/Document.cpp:
2013         (WebCore::Document::registerCollection): Takes a boolean to indicate whether collection has a valid cache
2014         for the id and name map.
2015         (WebCore::Document::unregisterCollection): Ditto.
2016         (WebCore::Document::collectionCachedIdNameMap): Added.
2017         (WebCore::Document::collectionWillClearIdNameMap): Added.
2018         * dom/Document.h:
2019
2020         * dom/NodeRareData.h:
2021         (WebCore::NodeListsNodeData::adoptDocument): Call invalidateCache on HTML collections after, not before,
2022         calling unregisterCollection and registerCollection since collections' owner nodes have already been
2023         moved to the new document here and invalidateCache uses owner node's document to call
2024         collectionWillClearIdNameMap. So calling invalidateCache before calling unregister/registerCollection
2025         would result in collectionWillClearIdNameMap getting called on a wrong document.
2026
2027         * html/HTMLCollection.cpp:
2028         (WebCore::HTMLCollection::HTMLCollection):
2029         (WebCore::HTMLCollection::~HTMLCollection):
2030         (WebCore::HTMLCollection::invalidateCache):
2031         (WebCore::HTMLCollection::invalidateIdNameCacheMaps): Added the code to uncount itself from the number
2032         of live node lists and HTML collections that need to be invalidated upon id and name attribute changes.
2033         (WebCore::HTMLCollection::updateNameCache):
2034
2035         * html/HTMLCollection.h:
2036         (WebCore::HTMLCollection::invalidateCache):
2037         (WebCore::HTMLCollection::hasIdNameCache): Renamed from hasNameCache.
2038         (WebCore::HTMLCollection::setHasIdNameCache): Renamed from setHasIdNameCache.
2039
2040         * html/HTMLFormControlsCollection.cpp:
2041         (WebCore::HTMLFormControlsCollection::updateNameCache):
2042
2043 2014-02-25  Frédéric Wang  <fred.wang@free.fr>
2044
2045         Add support for minsize/maxsize attributes.
2046         https://bugs.webkit.org/show_bug.cgi?id=122567
2047
2048         Reviewed by Chris Fleizach.
2049
2050         This change implements the minsize/maxsize attributes of the mo element.
2051         We also switch stretch sizes from int to LayoutUnit to improve accuracy.
2052
2053         Tests: mathml/presentation/stretchy-minsize-maxsize-dynamic.html
2054                mathml/presentation/stretchy-minsize-maxsize.html
2055
2056         * rendering/mathml/RenderMathMLOperator.cpp:
2057         (WebCore::RenderMathMLOperator::SetOperatorProperties):
2058         (WebCore::RenderMathMLOperator::stretchTo):
2059         * rendering/mathml/RenderMathMLOperator.h:
2060         * rendering/mathml/RenderMathMLRow.cpp:
2061         (WebCore::RenderMathMLRow::layout):
2062
2063 2014-02-25  Mihnea Ovidenie  <mihnea@adobe.com>
2064
2065         [CSSRegions] Small clean-up of flow threads accelerated compositing code
2066         https://bugs.webkit.org/show_bug.cgi?id=129312
2067
2068         Reviewed by Andrei Bucur.
2069
2070         Some clean-up for the code used for regions in accelerated compositing functionality:
2071         1. Rename updateRenderFlowThreadLayersIfNeeded -> updateFlowThreadsLayerToRegionMappingsIfNeeded
2072         as the function updates the mapping between the flow threads layers and their corresponding regions
2073         2. Remove RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded and move the code in place
2074         at call site since the function body does not require a dedicated function.
2075
2076         No new functionality, no new tests.
2077
2078         * rendering/FlowThreadController.cpp:
2079         (WebCore::FlowThreadController::updateFlowThreadsLayerToRegionMappingsIfNeeded):
2080         Now that the regions are always layers, we do not need to iterate backwards.
2081         * rendering/FlowThreadController.h:
2082         * rendering/RenderLayerCompositor.cpp:
2083         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2084         * rendering/RenderLayerCompositor.h:
2085
2086 2014-02-25  Zalan Bujtas  <zalan@apple.com>
2087
2088         Subpixel rendering: Ensure consistent border painting width.
2089         https://bugs.webkit.org/show_bug.cgi?id=129259
2090
2091         Reviewed by Simon Fraser.
2092
2093         Border edges are painted as (semi)independent rectangles. When snapping an edge rectangle
2094         to device pixels, its painted dimensions depend on its size and its fractional position.
2095         Specific combination of position and border width can result in painting edges sized differently.
2096         Using device snapped border width to calculate inner/outer rectangles helps to maintain
2097         uniform border width.
2098
2099         Currently not testable.
2100
2101         * rendering/RenderBoxModelObject.cpp:
2102         (WebCore::BorderEdge::BorderEdge):
2103         (WebCore::BorderEdge::shouldRender):
2104         (WebCore::BorderEdge::presentButInvisible):
2105         (WebCore::BorderEdge::widthForPainting):
2106         (WebCore::BorderEdge::getDoubleBorderStripeWidths):
2107         (WebCore::RenderBoxModelObject::paintOneBorderSide):
2108         (WebCore::calculateSideRect):
2109         (WebCore::RenderBoxModelObject::paintBorderSides):
2110         (WebCore::RenderBoxModelObject::paintBorder):
2111         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2112         (WebCore::calculateSideRectIncludingInner):
2113
2114 2014-02-25  Zalan Bujtas  <zalan@apple.com>
2115
2116         Subpixel layout: Remove explicit static_cast<LayoutUnit> conversions.
2117         https://bugs.webkit.org/show_bug.cgi?id=129359
2118
2119         Reviewed by Simon Fraser.
2120
2121         No testable change in behavior.
2122
2123         * css/LengthFunctions.cpp:
2124         (WebCore::minimumValueForLength):
2125         * page/FrameView.cpp:
2126         (WebCore::FrameView::forceLayoutForPagination):
2127         * rendering/InlineFlowBox.cpp:
2128         (WebCore::InlineFlowBox::paintFillLayer):
2129         * rendering/InlineFlowBox.h:
2130         (WebCore::InlineFlowBox::logicalLeftVisualOverflow):
2131         (WebCore::InlineFlowBox::logicalRightVisualOverflow):
2132         * rendering/InlineTextBox.cpp:
2133         (WebCore::InlineTextBox::isSelected):
2134         * rendering/RenderBlock.cpp:
2135         (WebCore::RenderBlock::computeColumnCountAndWidth):
2136         (WebCore::getBPMWidth):
2137         * rendering/RenderBlockFlow.cpp:
2138         (WebCore::RenderBlockFlow::adjustForBorderFit):
2139         * rendering/RenderDeprecatedFlexibleBox.cpp:
2140         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2141         * rendering/RenderFieldset.cpp:
2142         (WebCore::RenderFieldset::paintBoxDecorations):
2143         * rendering/RenderTable.h:
2144         (WebCore::RenderTable::borderSpacingInRowDirection):
2145         * rendering/RenderTextControlMultiLine.cpp:
2146         (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
2147         * rendering/RenderTextControlSingleLine.cpp:
2148         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
2149         * rendering/RootInlineBox.cpp:
2150         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
2151         (WebCore::RootInlineBox::ascentAndDescentForBox):
2152         * rendering/svg/RenderSVGRoot.cpp:
2153         (WebCore::resolveLengthAttributeForSVG):
2154
2155 2014-02-25  Anders Carlsson  <andersca@apple.com>
2156
2157         Build fixes.
2158
2159         * CMakeLists.txt:
2160         * GNUmakefile.list.am:
2161         * WebCore.vcxproj/WebCore.vcxproj:
2162         * WebCore.vcxproj/WebCore.vcxproj.filters:
2163
2164 2014-02-25  Benjamin Poulain  <bpoulain@apple.com>
2165
2166         Build fix for OS X after r164690
2167
2168         * WebCore.exp.in:
2169
2170 2014-02-25  Anders Carlsson  <andersca@apple.com>
2171
2172         Rename WebCore::VisitedLinkProvider to WebCore::VisitedLinkStore
2173         https://bugs.webkit.org/show_bug.cgi?id=129357
2174
2175         Reviewed by Sam Weinig.
2176
2177         * WebCore.exp.in:
2178         * WebCore.xcodeproj/project.pbxproj:
2179         * dom/VisitedLinkState.cpp:
2180         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
2181         * loader/HistoryController.cpp:
2182         (WebCore::addVisitedLink):
2183         * page/DefaultVisitedLinkStore.cpp: Renamed from Source/WebCore/page/DefaultVisitedLinkProvider.cpp.
2184         (WebCore::DefaultVisitedLinkStore::create):
2185         (WebCore::DefaultVisitedLinkStore::DefaultVisitedLinkStore):
2186         (WebCore::DefaultVisitedLinkStore::~DefaultVisitedLinkStore):
2187         (WebCore::DefaultVisitedLinkStore::isLinkVisited):
2188         (WebCore::DefaultVisitedLinkStore::addVisitedLink):
2189         * page/DefaultVisitedLinkStore.h: Renamed from Source/WebCore/page/DefaultVisitedLinkProvider.h.
2190         * page/Page.cpp:
2191         (WebCore::Page::Page):
2192         (WebCore::Page::visitedLinkStore):
2193         * page/Page.h:
2194         * page/PageGroup.cpp:
2195         (WebCore::PageGroup::visitedLinkStore):
2196         * page/PageGroup.h:
2197         * page/VisitedLinkStore.cpp: Renamed from Source/WebCore/page/VisitedLinkProvider.cpp.
2198         (WebCore::VisitedLinkStore::VisitedLinkStore):
2199         (WebCore::VisitedLinkStore::~VisitedLinkStore):
2200         * page/VisitedLinkStore.h: Renamed from Source/WebCore/page/VisitedLinkProvider.h.
2201
2202 2014-02-25  Enrica Casucci  <enrica@apple.com>
2203
2204         [WebKit2] Form controls handling.
2205         https://bugs.webkit.org/show_bug.cgi?id=129344
2206         <rdar://problem/16053643>
2207
2208         Reviewed by Simon Fraser and Joseph Pecoraro.
2209
2210         Adding some exports.
2211         
2212         * WebCore.exp.in:
2213
2214 2014-02-25  Samuel White  <samuel_white@apple.com>
2215
2216         Add accessibility search predicate support for AXOutlines
2217         https://bugs.webkit.org/show_bug.cgi?id=123748
2218
2219         Reviewed by Chris Fleizach.
2220
2221         Added new AXOutlineSearchKey to support finding elements with aria role=tree.
2222
2223         No new tests, updated existing search-predicate.html test to cover AXOutlineSearchKey.
2224
2225         * accessibility/AccessibilityObject.cpp:
2226         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
2227         * accessibility/AccessibilityObject.h:
2228         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2229         (createAccessibilitySearchKeyMap):
2230
2231 2014-02-25  Mark Lam  <mark.lam@apple.com>
2232
2233         Need to initialize VM stack data even when the VM is on an exclusive thread.
2234         <https://webkit.org/b/129265>
2235
2236         Not reviewed.
2237
2238         No new tests.
2239
2240         Relanding r164627 now that <https://webkit.org/b/129341> is fixed.
2241
2242         * bindings/js/JSDOMBinding.cpp:
2243         (WebCore::reportException):
2244         * bindings/js/JSDOMWindowBase.cpp:
2245         (WebCore::JSDOMWindowBase::commonVM):
2246
2247 2014-02-25  Mark Lam  <mark.lam@apple.com>
2248
2249         JSDOMPromise methods should acquire VM lock before calling into JS.
2250         <https://webkit.org/b/129341>
2251
2252         Reviewed by Geoffrey Garen.
2253
2254         No new tests.
2255
2256         * bindings/js/JSDOMPromise.h:
2257         (WebCore::DeferredWrapper::resolve):
2258         (WebCore::DeferredWrapper::reject):
2259         (WebCore::DeferredWrapper::resolve<String>):
2260         (WebCore::DeferredWrapper::resolve<bool>):
2261         (WebCore::char>>):
2262         (WebCore::DeferredWrapper::reject<String>):
2263
2264 2014-02-25  Anders Carlsson  <andersca@apple.com>
2265
2266         Simplify visited link style invalidation
2267         https://bugs.webkit.org/show_bug.cgi?id=129340
2268
2269         Reviewed by Dan Bernstein.
2270
2271         Get rid of the static Page::allVisitedStateChanged and Page::visitedStateChanged
2272         member functions and add functions to invalidate all styles on a single page or the style
2273         for a single link hash on a single page.
2274
2275         * WebCore.exp.in:
2276         * page/Page.cpp:
2277         (WebCore::Page::invalidateStylesForAllLinks):
2278         (WebCore::Page::invalidateStylesForLink):
2279         * page/Page.h:
2280         * page/PageGroup.cpp:
2281         (WebCore::PageGroup::addVisitedLink):
2282         (WebCore::PageGroup::removeVisitedLink):
2283         (WebCore::PageGroup::removeVisitedLinks):
2284
2285 2014-02-25  Andreas Kling  <akling@apple.com>
2286
2287         Remove unused ThreadSpecificInspectorCounters.
2288         <https://webkit.org/b/129337>
2289
2290         We were keeping count of all the JS event listeners in every thread
2291         to support an old Chromium feature that's no longer relevant.
2292
2293         Removing this gets rid of expensive thread-local storage lookups.
2294
2295         Reviewed by Anders Carlsson.
2296
2297         * bindings/js/JSEventListener.cpp:
2298         (WebCore::JSEventListener::JSEventListener):
2299         (WebCore::JSEventListener::~JSEventListener):
2300         * inspector/InspectorCounters.cpp:
2301         * inspector/InspectorCounters.h:
2302         * inspector/InspectorTimelineAgent.cpp:
2303         (WebCore::InspectorTimelineAgent::setDOMCounters):
2304         * inspector/protocol/Timeline.json:
2305         * platform/ThreadGlobalData.cpp:
2306         (WebCore::ThreadGlobalData::ThreadGlobalData):
2307         (WebCore::ThreadGlobalData::destroy):
2308         * platform/ThreadGlobalData.h:
2309
2310 2014-02-25  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
2311
2312         display:table with padding and/or borders in border-box calculates height incorrectly
2313         https://bugs.webkit.org/show_bug.cgi?id=126576
2314
2315         Reviewed by David Hyatt.
2316
2317         Based on blink issue https://codereview.chromium.org/25206002/
2318
2319         Tests: fast/box-sizing/css-table-collapse.html
2320                fast/box-sizing/css-table-no-collapse.html
2321                fast/box-sizing/table-collapse.html
2322                fast/box-sizing/table-no-collapse.html
2323
2324         * rendering/RenderBox.cpp:
2325         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2326
2327 2014-02-25  Anders Carlsson  <andersca@apple.com>
2328
2329         Get rid of VisitedLinkStrategy
2330         https://bugs.webkit.org/show_bug.cgi?id=129324
2331
2332         Reviewed by Dan Bernstein.
2333
2334         * GNUmakefile.list.am:
2335         * WebCore.vcxproj/WebCore.vcxproj:
2336         * WebCore.vcxproj/WebCore.vcxproj.filters:
2337         * WebCore.xcodeproj/project.pbxproj:
2338         * platform/PlatformStrategies.h:
2339         (WebCore::PlatformStrategies::PlatformStrategies):
2340         * platform/VisitedLinkStrategy.h: Removed.
2341
2342 2014-02-25  Alexey Proskuryakov  <ap@apple.com>
2343
2344         Rolling out http://trac.webkit.org/changeset/164611, because it broke
2345         WebKit2.PrivateBrowsingPushStateNoHistoryCallback API test
2346
2347         The change was for:
2348
2349         https://bugs.webkit.org/show_bug.cgi?id=129141
2350         Create SessionID class
2351
2352 2014-02-25  Commit Queue  <commit-queue@webkit.org>
2353
2354         Unreviewed, rolling out r164627.
2355         http://trac.webkit.org/changeset/164627
2356         https://bugs.webkit.org/show_bug.cgi?id=129325
2357
2358         Broke SubtleCrypto tests (Requested by ap on #webkit).
2359
2360         * bindings/js/JSDOMBinding.cpp:
2361         (WebCore::reportException):
2362         * bindings/js/JSDOMWindowBase.cpp:
2363         (WebCore::JSDOMWindowBase::commonVM):
2364
2365 2014-02-25  Anders Carlsson  <andersca@apple.com>
2366
2367         DefaultVisitedLinkProvider can just call into the page group directly
2368         https://bugs.webkit.org/show_bug.cgi?id=129320
2369
2370         Reviewed by Andreas Kling.
2371
2372         * page/DefaultVisitedLinkProvider.cpp:
2373         (WebCore::DefaultVisitedLinkProvider::isLinkVisited):
2374         (WebCore::DefaultVisitedLinkProvider::addVisitedLink):
2375
2376 2014-02-25  Commit Queue  <commit-queue@webkit.org>
2377
2378         Unreviewed, rolling out r164638.
2379         http://trac.webkit.org/changeset/164638
2380         https://bugs.webkit.org/show_bug.cgi?id=129321
2381
2382         Broke Windows build. (Requested by bfulgham on #webkit).
2383
2384         * dom/ContainerNode.h:
2385         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
2386         (WebCore::ChildNodesLazySnapshot::hasSnapshot):
2387         * dom/Element.cpp:
2388         (WebCore::ensureAttrNodeListForElement):
2389         (WebCore::Element::attributes):
2390         * dom/ElementIteratorAssertions.h:
2391         (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
2392         * dom/ElementRareData.h:
2393         (WebCore::ElementRareData::create):
2394         (WebCore::ElementRareData::setAttributeMap):
2395         * dom/MutationObserverRegistration.cpp:
2396         (WebCore::MutationObserverRegistration::create):
2397         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
2398         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
2399         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
2400         * dom/MutationObserverRegistration.h:
2401         * dom/NamedNodeMap.h:
2402         (WebCore::NamedNodeMap::create):
2403         (WebCore::NamedNodeMap::NamedNodeMap):
2404         * dom/Node.cpp:
2405         (WebCore::Node::ensureRareData):
2406         (WebCore::Node::didMoveToNewDocument):
2407         (WebCore::Node::ensureEventTargetData):
2408         (WebCore::Node::mutationObserverRegistry):
2409         (WebCore::Node::registerMutationObserver):
2410         (WebCore::Node::unregisterMutationObserver):
2411         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2412         * dom/Node.h:
2413         * dom/NodeRareData.h:
2414         (WebCore::NodeListsNodeData::create):
2415         (WebCore::NodeListsNodeData::NodeListsNodeData):
2416         (WebCore::NodeMutationObserverData::create):
2417         (WebCore::NodeMutationObserverData::NodeMutationObserverData):
2418         (WebCore::NodeRareData::create):
2419         (WebCore::NodeRareData::clearNodeLists):
2420         (WebCore::NodeRareData::ensureNodeLists):
2421         (WebCore::NodeRareData::ensureMutationObserverData):
2422         (WebCore::NodeRareData::NodeRareData):
2423         * dom/StyledElement.cpp:
2424         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2425
2426 2014-02-25  Eric Carlson  <eric.carlson@apple.com>
2427
2428         [iOS] Show status image when playing video to external device
2429         https://bugs.webkit.org/show_bug.cgi?id=129277
2430
2431         Reviewed by Jer Noble.
2432
2433         * Modules/mediacontrols/mediaControlsApple.js:
2434         (Controller.prototype.handleEvent): Restructure the code so it is possible to handle events
2435             that target the video element which aren't in the HandledVideoEvents array.
2436
2437         * Modules/mediacontrols/mediaControlsiOS.js:
2438         (ControllerIOS.prototype.currentPlaybackTargetIsWireless): webkitCurrentPlaybackTargetIsWireless
2439             is an attribute, not a function.
2440         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Fix style.
2441         (ControllerIOS.prototype.updateWirelessTargetAvailable): Ditto.
2442         (ControllerIOS.prototype.updateProgress): Ditto.
2443         (ControllerIOS.prototype.handleWrapperTouchStart): Show the controls if the wireless status
2444             display is touched.
2445         (ControllerIOS.prototype.handleFullscreenButtonClicked): Fix style
2446         (ControllerIOS.prototype.handleWirelessPlaybackChange): Ditto.
2447         (ControllerIOS.prototype.handleWirelessTargetAvailableChange):
2448         (ControllerIOS.prototype.handleWirelessPickerButtonClicked): Ditto. Stop even propagation.
2449
2450         Move "playback target" logic into HTMLMediaSession.
2451         * html/HTMLMediaElement.cpp:
2452         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call media session.
2453         (WebCore::HTMLMediaElement::loadResource): Tell media session to apply media player
2454             restrictions now that it has a url.
2455         (WebCore::HTMLMediaElement::invalidateCachedTime): Only log when cached time is not 
2456             already invalie.
2457         (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Call media session.
2458         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Ditto.
2459         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
2460         (WebCore::HTMLMediaElement::addEventListener): Ditto.
2461         (WebCore::HTMLMediaElement::removeEventListen): Ditto.
2462         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
2463         (WebCore::HTMLMediaElement::createMediaPlayer): Ditto.
2464
2465         * html/HTMLMediaSession.cpp:
2466         (WebCore::restrictionName): Log new WirelessVideoPlaybackDisabled restriction.
2467         (WebCore::HTMLMediaSession::showingPlaybackTargetPickerPermitted): Return false if there
2468             is no page, or if wireless playback is disabled.
2469         (WebCore::HTMLMediaSession::currentPlaybackTargetIsWireless): New, logic from HTMLMediaElement.
2470         (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Ditto.
2471         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets): Ditto.
2472         (WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Ditto.
2473         (WebCore::HTMLMediaSession::setWirelessVideoPlaybackDisabled): Ditto.
2474         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Ditto.
2475         (WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): New, apply media player specific
2476             restriction.
2477         * html/HTMLMediaSession.h:
2478
2479         Move "playback target" logic into HTMLMediaSession.
2480         * html/HTMLVideoElement.cpp:
2481         (WebCore::HTMLVideoElement::parseAttribute): Call media session.
2482         (WebCore::HTMLVideoElement::webkitWirelessVideoPlaybackDisabled): Call media session.
2483
2484         * platform/audio/MediaSessionManager.h:
2485         (WebCore::MediaSessionManager::showPlaybackTargetPicker): New method, does nothing in base class.
2486
2487         * platform/audio/ios/MediaSessionManagerIOS.h:
2488         * platform/audio/ios/MediaSessionManagerIOS.mm:
2489         (WebCore::MediaSessionManageriOS::showPlaybackTargetPicker): Add non-functional stub.
2490
2491         Implement wireless playback control and status API.
2492         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2493         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Dispatch TargetIsWirelessChanged.
2494         (WebCore::MediaPlayerPrivateAVFoundation::playbackTargetIsWirelessChanged): Pass through to
2495             media element.
2496         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2497
2498         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2499         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2500         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
2501             m_allowsWirelessVideoPlayback.
2502         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Remove "externalPlaybackActive" observer.
2503         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): Fix broken logging.
2504         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Add "externalPlaybackActive" observer,
2505             set initial wireless playback.
2506         (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):  Fix broken logging.
2507         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Ditto.
2508         (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless): New.
2509         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled): New.
2510         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled): New.
2511         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackTargetIsWirelessDidChange): New.
2512         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Deal with 
2513             externalPlaybackActive.
2514
2515 2014-02-24  Brent Fulgham  <bfulgham@apple.com>
2516
2517         [Win] Gracefully recover from missing 'naturalSize' parameter for media
2518         https://bugs.webkit.org/show_bug.cgi?id=129278
2519
2520         Reviewed by Eric Carlson.
2521
2522         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add declaration for
2523         missing function call.
2524         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2525         (WebCore::MediaPlayerPrivateAVFoundationCF::assetStatus): Don't treat missing 'naturalSize'
2526         as a fatal error.
2527         (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged): Handle case of asset track
2528         not being available yet. 
2529         (WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged): If the 'naturalSize' is empty,
2530         use the Player Item's 'presentationSize' instead.
2531         (WebCore::AVFWrapper::processNotification): Add missing handler for duration changed.
2532
2533 2014-02-25  Sergio Villar Senin  <svillar@igalia.com>
2534
2535         [CSS Grid Layout] Add ENABLE flag
2536         https://bugs.webkit.org/show_bug.cgi?id=129153
2537
2538         Reviewed by Simon Fraser.
2539
2540         Added ENABLE_CSS_GRID_LAYOUT feature flag.
2541
2542         * Configurations/FeatureDefines.xcconfig:
2543         * css/CSSComputedStyleDeclaration.cpp:
2544         (WebCore::isLayoutDependent):
2545         (WebCore::ComputedStyleExtractor::propertyValue):
2546         * css/CSSGridTemplateAreasValue.cpp:
2547         * css/CSSGridTemplateAreasValue.h:
2548         * css/CSSParser.cpp:
2549         (WebCore::CSSParserContext::CSSParserContext):
2550         (WebCore::operator==):
2551         (WebCore::isValidKeywordPropertyAndValue):
2552         (WebCore::isKeywordPropertyID):
2553         (WebCore::CSSParser::parseValue):
2554         * css/CSSParser.h:
2555         * css/CSSParserMode.h:
2556         * css/CSSPrimitiveValueMappings.h:
2557         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2558         * css/CSSPropertyNames.in:
2559         * css/CSSValue.cpp:
2560         (WebCore::CSSValue::equals):
2561         (WebCore::CSSValue::cssText):
2562         (WebCore::CSSValue::destroy):
2563         * css/DeprecatedStyleBuilder.cpp:
2564         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2565         * css/StyleProperties.cpp:
2566         (WebCore::StyleProperties::getPropertyValue):
2567         * css/StylePropertyShorthand.cpp:
2568         (WebCore::shorthandForProperty):
2569         (WebCore::matchingShorthandsForLonghand):
2570         * css/StyleResolver.cpp:
2571         (WebCore::equivalentBlockDisplay):
2572         (WebCore::StyleResolver::adjustRenderStyle):
2573         (WebCore::StyleResolver::applyProperty):
2574         * css/StyleResolver.h:
2575         * dom/Document.cpp:
2576         * dom/Document.h:
2577         * rendering/RenderElement.cpp:
2578         (WebCore::RenderElement::createFor):
2579         * rendering/RenderGrid.cpp:
2580         * rendering/RenderGrid.h:
2581         * rendering/style/GridCoordinate.h:
2582         * rendering/style/GridLength.h:
2583         * rendering/style/GridPosition.h:
2584         * rendering/style/GridTrackSize.h:
2585         * rendering/style/RenderStyle.cpp:
2586         (WebCore::RenderStyle::changeRequiresLayout):
2587         * rendering/style/RenderStyle.h:
2588         * rendering/style/RenderStyleConstants.h:
2589         * rendering/style/StyleAllInOne.cpp:
2590         * rendering/style/StyleGridData.cpp:
2591         * rendering/style/StyleGridData.h:
2592         * rendering/style/StyleGridItemData.cpp:
2593         * rendering/style/StyleGridItemData.h:
2594         * rendering/style/StyleRareNonInheritedData.cpp:
2595         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2596         (WebCore::StyleRareNonInheritedData::operator==):
2597         * rendering/style/StyleRareNonInheritedData.h:
2598
2599 2014-02-25  Jer Noble  <jer.noble@apple.com>
2600
2601         [EME][Mac] Fix a few issues in CDMSessionMediaSourceAVFObjC.
2602         https://bugs.webkit.org/show_bug.cgi?id=129310
2603
2604         Reviewed by Eric Carlson.
2605
2606         Only send a 'keyerror' event if an actual error code was returned, not just
2607         when no key was added:
2608         * Modules/encryptedmedia/MediaKeySession.cpp:
2609         (WebCore::MediaKeySession::addKeyTimerFired):
2610
2611         The 'length' parameter to a typed ArrayBufferView is the number of entries
2612         in the array, not the byte length:
2613         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2614         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
2615
2616         The return value of streamingContentKeyRequestDataForApp:contentIdentifier:trackId:options:error
2617         is autoreleased; do not wrap it in an adoptNS:
2618         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2619         (WebCore::CDMSessionMediaSourceAVFObjC::update):
2620
2621 2014-02-25  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2622
2623         [MediaStream] Adding mock implementation of UserMediaClient
2624         https://bugs.webkit.org/show_bug.cgi?id=129274
2625
2626         Reviewed by Eric Carlson.
2627
2628         * platform/mock/UserMediaClientMock.h: Added.
2629         (WebCore::UserMediaClientRequestNotifier::UserMediaClientRequestNotifier):
2630         * testing/Internals.cpp:
2631         (WebCore::Internals::Internals):
2632
2633 2014-02-25  Ryosuke Niwa  <rniwa@webkit.org>
2634
2635         Tighten bitfields in live NodeLists and HTMLCollections
2636         https://bugs.webkit.org/show_bug.cgi?id=129300
2637
2638         Reviewed by Geoffrey Garen.
2639
2640         Reduce the number of bits used for m_rootType and m_type in LiveNodeList.
2641         Also use enum class for LiveNodeList types. We keep "Type" suffix not to
2642         confuse old-ish compilers.
2643
2644         * dom/ClassNodeList.cpp:
2645         (WebCore::ClassNodeList::ClassNodeList):
2646         * dom/ContainerNode.cpp:
2647         (WebCore::ContainerNode::getElementsByTagName):
2648         (WebCore::ContainerNode::getElementsByName):
2649         (WebCore::ContainerNode::getElementsByClassName):
2650         (WebCore::ContainerNode::radioNodeList):
2651         * dom/LiveNodeList.cpp:
2652         (WebCore::LiveNodeList::collectionFirst):
2653         (WebCore::LiveNodeList::collectionTraverseForward):
2654         * dom/LiveNodeList.h:
2655         (WebCore::LiveNodeList::LiveNodeList):
2656         * dom/NameNodeList.cpp:
2657         (WebCore::NameNodeList::NameNodeList):
2658         * dom/NameNodeList.h:
2659         (WebCore::NameNodeList::create):
2660         * dom/NodeRareData.h:
2661         (WebCore::NodeListsNodeData::namedNodeListKey):
2662         * dom/TagNodeList.cpp:
2663         (WebCore::HTMLTagNodeList::HTMLTagNodeList):
2664         * dom/TagNodeList.h:
2665         (WebCore::TagNodeList::create):
2666         (WebCore::HTMLTagNodeList::create):
2667         * html/HTMLCollection.h:
2668         * html/LabelableElement.cpp:
2669         (WebCore::LabelableElement::labels):
2670         * html/LabelsNodeList.cpp:
2671         (WebCore::LabelsNodeList::LabelsNodeList):
2672         * html/LabelsNodeList.h:
2673         * html/RadioNodeList.cpp:
2674         (WebCore::RadioNodeList::RadioNodeList):
2675         * html/RadioNodeList.h:
2676         (WebCore::RadioNodeList::create):
2677
2678 2014-02-24  Anders Carlsson  <andersca@apple.com>
2679
2680         Make it possible to set the visited link provider on a per page basis
2681         https://bugs.webkit.org/show_bug.cgi?id=129288
2682
2683         Reviewed by Andreas Kling.
2684
2685         * WebCore.exp.in:
2686         Export symbols needed by WebKit2.
2687
2688         * WebCore.xcodeproj/project.pbxproj:
2689         Make VisitedLinkProvider a private header.
2690
2691         * page/Page.cpp:
2692         (WebCore::Page::Page):
2693         Take the visited link provider from the PageClients object.
2694
2695         (WebCore::Page::visitedLinkProvider):
2696         If the page has a visited link provider set, return it.
2697
2698         * page/Page.h:
2699         Add VisitedLinkProvider to Page and PageClients.
2700
2701 2014-02-25  Morten Stenshorne  <mstensho@opera.com>
2702
2703         [New Multicolumn] -webkit-column-break-inside:avoid doesn't work
2704         https://bugs.webkit.org/show_bug.cgi?id=129299
2705
2706         Reviewed by Andrei Bucur.
2707
2708         adjustForUnsplittableChild() simply forgot to check whether we
2709         were inside flow thread based multicol.
2710
2711         Test: fast/multicol/newmulticol/avoid-column-break-inside.html
2712
2713         * rendering/RenderBlockFlow.cpp:
2714         (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
2715
2716 2014-02-25  Mihnea Ovidenie  <mihnea@adobe.com>
2717
2718         [CSSRegions] Remove unused function RenderFlowThread::regionForCompositedLayer
2719         https://bugs.webkit.org/show_bug.cgi?id=129303
2720
2721         Reviewed by Andrei Bucur.
2722
2723         Cleanup, no funtionality change, no new tests.
2724
2725         * rendering/RenderFlowThread.h:
2726
2727 2014-02-25  Mihai Tica  <mitica@adobe.com>
2728
2729         [CSS Blending] -webkit-mix-blend-mode should force transform-style: flat.
2730         https://bugs.webkit.org/show_bug.cgi?id=126158
2731
2732         Reviewed by Mihnea Ovidenie.
2733
2734         As stated in the http://www.w3.org/TR/css3-transforms/#propdef-transform-style, an element with blending
2735         should force transform-style: flat.
2736
2737         Test: css3/compositing/blend-mode-transform-style.html
2738
2739         * css/StyleResolver.cpp:
2740         (WebCore::StyleResolver::adjustRenderStyle): If blending is detected, set transform-style to flat.
2741
2742 2014-02-25  Zan Dobersek  <zdobersek@igalia.com>
2743
2744         Move to using std::unique_ptr for Element, Node and related classes
2745         https://bugs.webkit.org/show_bug.cgi?id=129058
2746
2747         Reviewed by Anders Carlsson.
2748
2749         Replace uses of OwnPtr and PassOwnPtr in Element, Node and the related
2750         classes with std::unique_ptr and move semantics.
2751
2752         * dom/ContainerNode.h:
2753         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
2754         (WebCore::ChildNodesLazySnapshot::hasSnapshot):
2755         * dom/Element.cpp:
2756         (WebCore::ensureAttrNodeListForElement):
2757         (WebCore::Element::attributes):
2758         * dom/ElementIteratorAssertions.h:
2759         (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
2760         * dom/ElementRareData.h:
2761         (WebCore::ElementRareData::setAttributeMap):
2762         * dom/MutationObserverRegistration.cpp:
2763         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
2764         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
2765         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
2766         * dom/MutationObserverRegistration.h:
2767         * dom/NamedNodeMap.h:
2768         (WebCore::NamedNodeMap::NamedNodeMap):
2769         * dom/Node.cpp:
2770         (WebCore::Node::ensureRareData):
2771         (WebCore::Node::didMoveToNewDocument):
2772         (WebCore::Node::ensureEventTargetData):
2773         (WebCore::Node::mutationObserverRegistry):
2774         (WebCore::Node::registerMutationObserver):
2775         (WebCore::Node::unregisterMutationObserver):
2776         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2777         * dom/Node.h:
2778         * dom/NodeRareData.h:
2779         (WebCore::NodeListsNodeData::NodeListsNodeData):
2780         (WebCore::NodeRareData::NodeRareData):
2781         (WebCore::NodeRareData::clearNodeLists):
2782         (WebCore::NodeRareData::ensureNodeLists):
2783         (WebCore::NodeRareData::ensureMutationObserverData):
2784         * dom/StyledElement.cpp:
2785         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2786
2787 2014-02-25  Andreas Kling  <akling@apple.com>
2788
2789         Prune dead code for Web Inspector memory instrumentation.
2790         <https://webkit.org/b/129286>
2791
2792         This was leftover code from Chromium's inspector. It's not used by
2793         today's WebKit inspector.
2794
2795         Reviewed by Sam Weinig.
2796
2797         * CMakeLists.txt:
2798         * DerivedSources.make:
2799         * GNUmakefile.am:
2800         * GNUmakefile.list.am:
2801         * WebCore.vcxproj/WebCore.vcxproj:
2802         * WebCore.vcxproj/WebCore.vcxproj.filters:
2803         * WebCore.xcodeproj/project.pbxproj:
2804         * inspector/InspectorAllInOne.cpp:
2805         * inspector/InspectorController.cpp:
2806         (WebCore::InspectorController::InspectorController):
2807         * inspector/InspectorController.h:
2808         * inspector/InspectorMemoryAgent.cpp: Removed.
2809         * inspector/InspectorMemoryAgent.h: Removed.
2810         * inspector/InspectorTimelineAgent.cpp:
2811         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2812         * inspector/InspectorTimelineAgent.h:
2813         * inspector/WorkerInspectorController.cpp:
2814         (WebCore::WorkerInspectorController::WorkerInspectorController):
2815         * inspector/protocol/Memory.json: Removed.
2816
2817 2014-02-24  Chris Fleizach  <cfleizach@apple.com>
2818
2819         AX: Support abbr, acronym
2820         https://bugs.webkit.org/show_bug.cgi?id=128860
2821
2822         Reviewed by Mario Sanchez Prada.
2823
2824         Expose the data in <abbr>, <acronym> and <th abbr=""> as an 
2825         alternateTextValue() parameter.
2826
2827         Test: platform/mac/accessibility/abbr-acronym-tags.html
2828
2829         * accessibility/AccessibilityObject.cpp:
2830         (WebCore::AccessibilityObject::hasTagName):
2831         * accessibility/AccessibilityObject.h:
2832         (WebCore::AccessibilityObject::alternateTextValue):
2833         (WebCore::AccessibilityObject::supportsAlternateTextValue):
2834         * accessibility/AccessibilityRenderObject.cpp:
2835         (WebCore::AccessibilityRenderObject::alternateTextValue):
2836         (WebCore::AccessibilityRenderObject::supportsAlternateTextValue):
2837         * accessibility/AccessibilityRenderObject.h:
2838         * accessibility/AccessibilityTableCell.cpp:
2839         (WebCore::AccessibilityTableCell::alternateTextValue):
2840         (WebCore::AccessibilityTableCell::supportsAlternateTextValue):
2841         * accessibility/AccessibilityTableCell.h:
2842         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2843         (AXAttributeStringSetAlternateTextValue):
2844         (AXAttributedStringAppendText):
2845         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2846         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2847
2848 2014-02-24  Martin Robinson  <mrobinson@igalia.com>
2849
2850         [GTK] generate-gtkdoc should not generate documentation for source files for unbuilt source files
2851         https://bugs.webkit.org/show_bug.cgi?id=128417
2852
2853         Reviewed by Carlos Garcia Campos.
2854
2855         * bindings/gobject/GNUmakefile.am: Generate a config file for webkitdom documentation generation.
2856
2857 2014-02-24  Mark Lam  <mark.lam@apple.com>
2858
2859         Need to initialize VM stack data even when the VM is on an exclusive thread.
2860         <https://webkit.org/b/129265>
2861
2862         Reviewed by Geoffrey Garen.
2863
2864         No new tests.
2865
2866         * bindings/js/JSDOMBinding.cpp:
2867         (WebCore::reportException):
2868         - Added an assertion to ensure that we are holding the JSLock.
2869         * bindings/js/JSDOMWindowBase.cpp:
2870         (WebCore::JSDOMWindowBase::commonVM):
2871         - Updated to use the new VM::setExclusiveThread().
2872
2873 2014-02-24  Anders Carlsson  <andersca@apple.com>
2874
2875         Add a DefaultVisitedLinkProvider and route visited link actions through it
2876         https://bugs.webkit.org/show_bug.cgi?id=129285
2877
2878         Reviewed by Dan Bernstein.
2879
2880         DefaultVisitedLinkProvider currently just forwards everything to the visited link strategy,
2881         but will soon take over the responsibilities of visited link handling from PageGroup.
2882         
2883         * CMakeLists.txt:
2884         * GNUmakefile.list.am:
2885         * WebCore.vcxproj/WebCore.vcxproj:
2886         * WebCore.vcxproj/WebCore.vcxproj.filters:
2887         * WebCore.xcodeproj/project.pbxproj:
2888         * dom/VisitedLinkState.cpp:
2889         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
2890         * loader/HistoryController.cpp:
2891         (WebCore::addVisitedLink):
2892         (WebCore::HistoryController::updateForStandardLoad):
2893         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
2894         (WebCore::HistoryController::updateForClientRedirect):
2895         (WebCore::HistoryController::updateForSameDocumentNavigation):
2896         (WebCore::HistoryController::pushState):
2897         (WebCore::HistoryController::replaceState):
2898         * page/DefaultVisitedLinkProvider.cpp: Copied from Source/WebCore/page/VisitedLinkProvider.h.
2899         (WebCore::DefaultVisitedLinkProvider::create):
2900         (WebCore::DefaultVisitedLinkProvider::DefaultVisitedLinkProvider):
2901         (WebCore::DefaultVisitedLinkProvider::~DefaultVisitedLinkProvider):
2902         (WebCore::DefaultVisitedLinkProvider::isLinkVisited):
2903         (WebCore::DefaultVisitedLinkProvider::addVisitedLink):
2904         * page/DefaultVisitedLinkProvider.h: Copied from Source/WebCore/page/VisitedLinkProvider.h.
2905         * page/Page.cpp:
2906         (WebCore::Page::visitedLinkProvider):
2907         * page/Page.h:
2908         * page/PageGroup.cpp:
2909         (WebCore::PageGroup::PageGroup):
2910         (WebCore::PageGroup::visitedLinkProvider):
2911         * page/PageGroup.h:
2912         * page/VisitedLinkProvider.h:
2913
2914 2014-02-24  Jeremy Jones  <jeremyj@apple.com>
2915
2916         WK2 AVKit fullscreen doesn't display video.
2917         https://bugs.webkit.org/show_bug.cgi?id=128564
2918
2919         Reviewed by Simon Fraser.
2920
2921         * WebCore.exp.in:
2922         Export WebCore::PlatformCALayer::platformCALayer()
2923
2924         * platform/ios/WebVideoFullscreenInterface.h:
2925         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2926         Remove SetVideoLayerID(). 
2927
2928         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2929         (WebVideoFullscreenInterfaceAVKit::setVideoLayer):
2930         Wrap make video layer look like an AVAVPlayerLayer with WebAVPlayerLayer
2931
2932         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2933         (WebVideoFullscreenModelMediaElement::setMediaElement):
2934         Pass along the videoLayer before borrowing it so the interface will be ready to
2935         catch the transaction that removes it.
2936
2937 2014-02-24  Samuel White  <samuel_white@apple.com>
2938
2939         AX: AccessibilityObject::findMatchingObjects should never include 'this' in results.
2940         https://bugs.webkit.org/show_bug.cgi?id=129243
2941
2942         Reviewed by Chris Fleizach.
2943
2944         Fix removes the container object from the search results when searching backwards. This
2945         makes backwards & forwards search results consistent with each other.
2946
2947         Test: platform/mac/accessibility/search-predicate-container-not-included.html
2948
2949         * accessibility/AccessibilityObject.cpp:
2950         (WebCore::AccessibilityObject::findMatchingObjects):
2951
2952 2014-02-24  Samuel White  <samuel_white@apple.com>
2953
2954         AX: findMatchingObjects backwards start position inconsistent with forwards start position when startObject == nullptr.
2955         https://bugs.webkit.org/show_bug.cgi?id=129266
2956
2957         Reviewed by Chris Fleizach.
2958
2959         When searching forward with no start object, the first thing considered is the first child of
2960         the container. However, when searching backwards with no start object nothing in the container
2961         is considered; this basically negates the search. This patch makes backwards searching without
2962         a start object start from the last child of the container to match forward search expectations.
2963
2964         Test: platform/mac/accessibility/search-predicate-start-not-specified.html
2965
2966         * accessibility/AccessibilityObject.cpp:
2967         (WebCore::AccessibilityObject::findMatchingObjects):
2968
2969 2014-02-24  Andreas Kling  <akling@apple.com>
2970
2971         Prune dead code for Web Inspector canvas instrumentation.
2972         <https://webkit.org/b/129269>
2973
2974         This was leftover code from Chromium's inspector. It's not used by
2975         today's WebKit inspector.
2976
2977         Reviewed by Timothy Hatcher.
2978
2979         * CMakeLists.txt:
2980         * DerivedSources.make:
2981         * GNUmakefile.am:
2982         * GNUmakefile.list.am:
2983         * WebCore.vcxproj/WebCore.vcxproj:
2984         * WebCore.vcxproj/WebCore.vcxproj.filters:
2985         * WebCore.xcodeproj/project.pbxproj:
2986         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2987         (WebCore::JSHTMLCanvasElement::getContext):
2988         * inspector/InjectedScriptCanvasModule.cpp: Removed.
2989         * inspector/InjectedScriptCanvasModule.h: Removed.
2990         * inspector/InspectorAllInOne.cpp:
2991         * inspector/InspectorCanvasAgent.cpp: Removed.
2992         * inspector/InspectorCanvasAgent.h: Removed.
2993         * inspector/InspectorCanvasInstrumentation.h: Removed.
2994         * inspector/InspectorController.cpp:
2995         (WebCore::InspectorController::InspectorController):
2996         (WebCore::InspectorController::didBeginFrame):
2997         * inspector/InspectorInstrumentation.cpp:
2998         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
2999         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3000         * inspector/InspectorInstrumentation.h:
3001         * inspector/InstrumentingAgents.cpp:
3002         (WebCore::InstrumentingAgents::InstrumentingAgents):
3003         (WebCore::InstrumentingAgents::reset):
3004         * inspector/InstrumentingAgents.h:
3005
3006 2014-02-24  Zoltan Horvath  <zoltan@webkit.org>
3007
3008         [CSS Shapes] Adjust lineTop position to the next available wrapping location at shape-outsides
3009         https://bugs.webkit.org/show_bug.cgi?id=128693
3010
3011         Reviewed by David Hyatt.
3012
3013         When we don't have space next to the floating container, but we have space inside the floating-container next
3014         to the defined shape-outside, we should wrap around the shape-outside. This patch fixes the behavior both for
3015         cases when there is no space to fit at the first line, and for the additional lines cases.
3016
3017         Test: fast/shapes/shape-outside-floats/shape-outside-floats-linetop-adjustment.html
3018
3019         * rendering/line/BreakingContextInlineHeaders.h:
3020         (WebCore::BreakingContext::handleText):
3021         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
3022         * rendering/line/LineWidth.cpp:
3023         (WebCore::availableWidthAtOffset):
3024         (WebCore::LineWidth::updateLineDimension): Added new helper.
3025         (WebCore::isWholeLineFit): Added new helper.
3026         (WebCore::LineWidth::wrapNextToShapeOutside): Added new helper.
3027         (WebCore::LineWidth::fitBelowFloats): Add optional parameter for the function.
3028         * rendering/line/LineWidth.h:
3029
3030 2014-02-24  Martin Hock  <mhock@apple.com>
3031
3032         Create SessionID value-style class for session IDs.
3033         https://bugs.webkit.org/show_bug.cgi?id=129141
3034
3035         Reviewed by Brady Eidson.
3036
3037         * GNUmakefile.list.am:
3038         * WebCore.exp.in:
3039         * WebCore.xcodeproj/project.pbxproj:
3040         * page/Page.cpp: Add SessionID member.
3041         (WebCore::Page::Page):
3042         (WebCore::Page::sessionID): Retrieve sessionID or use settings if not set.
3043         * page/Page.h:
3044         (WebCore::Page::setSessionID):
3045         * page/SessionID.h: Session ID class consisting solely of its uint64_t session ID.
3046         (WebCore::SessionID::SessionID):
3047         (WebCore::SessionID::isValid): Not empty.
3048         (WebCore::SessionID::isEphemeral):
3049         (WebCore::SessionID::sessionID):
3050         (WebCore::SessionID::operator==): Value-based equality.
3051         (WebCore::SessionID::operator!=):
3052         (WebCore::SessionID::emptySessionID): Zero value also used for HashTraits emptyValue.
3053         (WebCore::SessionID::defaultSessionID):
3054         (WebCore::SessionID::legacyPrivateSessionID):
3055         * page/SessionIDHash.h:
3056         (WTF::SessionIDHash::hash): Just the casted session ID (low order bytes)
3057         (WTF::SessionIDHash::equal):
3058         (WTF::HashTraits<WebCore::SessionID>::emptyValue): Equal to emptySessionID.
3059         (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): -1 value.
3060         (WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
3061
3062 2014-02-24  Javier Fernandez  <jfernandez@igalia.com>
3063
3064         [CSS Grid Layout] handle undefined RemainingSpace in computeUsedBreadthOfGridTracks algorithm
3065         https://bugs.webkit.org/show_bug.cgi?id=128372
3066
3067         Reviewed by David Hyatt.
3068
3069         From Blink r165692 by <svillar@igalia.com>
3070
3071         The spec defines a different code path for the computeUsedBreadthOfGridTracks algorithm
3072         http://dev.w3.org/csswg/css-grid/#function-ComputeUsedBreadthOfGridTracks.
3073
3074         Basically the track breadth is different when the available size is undefined and thus,
3075         cannot be taken into account during the computations.
3076         The available size is undefined whenever the height is auto or the grid element has a
3077         shrink-to-fit behavior.
3078
3079         It was also renamed the function to match the specs so the function name starts with
3080         'compute' instead of 'computed'.
3081
3082         No new tests, but added new cases to some of them.
3083
3084         * rendering/RenderGrid.cpp:
3085         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
3086         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3087         (WebCore::gridElementIsShrinkToFit):
3088         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
3089         (WebCore::RenderGrid::layoutGridItems):
3090         * rendering/RenderGrid.h:
3091
3092 2014-02-24  Roger Fong  <roger_fong@apple.com>
3093
3094         [Windows] Unreviewed pre-emptive build fix.
3095
3096         * WebCore.vcxproj/WebCoreCommon.props: Add replay directory to include path.
3097
3098 2014-02-24  Brady Eidson  <beidson@apple.com>
3099
3100         Break out ImageControls style into an external stylesheet
3101         https://bugs.webkit.org/show_bug.cgi?id=129273
3102
3103         Reviewed by Jer Noble.
3104
3105         * DerivedSources.make:
3106         * WebCore.xcodeproj/project.pbxproj:
3107
3108         * css/CSSDefaultStyleSheets.cpp:
3109         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
3110         * css/CSSDefaultStyleSheets.h:
3111
3112         * html/shadow/mac/ImageControlsRootElementMac.cpp:
3113         (WebCore::ImageControlsRootElementMac::maybeCreate):
3114
3115         * html/shadow/mac/imageControlsMac.css:
3116         (.x-webkit-imagemenu):
3117         (.x-webkit-imagemenu:hover):
3118
3119         * rendering/RenderTheme.h:
3120         (WebCore::RenderTheme::mediaControlsScript):
3121         (WebCore::RenderTheme::imageControlsStyleSheet):
3122         * rendering/RenderThemeMac.h:
3123         * rendering/RenderThemeMac.mm:
3124         (WebCore::RenderThemeMac::imageControlsStyleSheet):
3125
3126 2014-02-24  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3127
3128         [WebRTC] Validating RTCConfiguration according to the spec
3129         https://bugs.webkit.org/show_bug.cgi?id=129182
3130
3131         Reviewed by Eric Carlson.
3132
3133         Spec states that:
3134             - iceServers should not be an empty list
3135             - the entry in the configuration dictionary is "urls", instead of "url"
3136             - urls can be either a list or a string
3137         Fixing all that in RTCConfiguration validation when creating a RTCPeerConnection
3138
3139         Existing tests were updated.
3140
3141         * Modules/mediastream/RTCPeerConnection.cpp:
3142         (WebCore::appendIceServer): Added.
3143         (WebCore::processIceServer): Added.
3144         (WebCore::RTCPeerConnection::parseConfiguration):
3145
3146 2014-02-24  Radu Stavila  <stavila@adobe.com>
3147
3148         [CSS Regions] Relative positioned elements overflowing the region do not get painted into the next tile
3149         https://bugs.webkit.org/show_bug.cgi?id=129254
3150
3151         Reviewed by Antti Koivisto.
3152
3153         The painting of the region's layer should not be aborted so early if the region's fragment shouldn't be painted
3154         because that would prevent all the layer's children from being painted.
3155
3156         Another problem this patch addresses is that clipping should also be performed when the clip rect is empty,
3157         which is what happens when painting in a tile in which the flowed element would normally be painted
3158         if it wasn't clipped by the region.
3159
3160         Test: fast/regions/content-relative-next-tile.html
3161
3162         * rendering/RenderLayer.cpp:
3163         (WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):
3164
3165 2014-02-24  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
3166         
3167         Get rid of the unused 'immediate' parameters from repaint related functions
3168         https://bugs.webkit.org/show_bug.cgi?id=129111
3169
3170         Reviewed by Simon Fraser.
3171
3172         Removing the 'immediate' parameters from repaint related functions - accoring
3173         to the FIXME in RenderView::repaintViewRectangle() - since they have no effect.
3174
3175         No new tests are necessary because there is no behavior change
3176
3177         * dom/Element.cpp:
3178         (WebCore::Element::setActive):
3179         * loader/EmptyClients.h:
3180         * page/Chrome.cpp:
3181         (WebCore::Chrome::invalidateRootView):
3182         (WebCore::Chrome::invalidateContentsAndRootView):
3183         (WebCore::Chrome::invalidateContentsForSlowScroll):
3184         * page/Chrome.h:
3185         * page/ChromeClient.h:
3186         * page/Frame.cpp:
3187         (WebCore::Frame::tiledBackingStorePaintEnd):
3188         * page/FrameView.cpp:
3189         (WebCore::FrameView::invalidateRect):
3190         (WebCore::FrameView::scrollContentsFastPath):
3191         (WebCore::FrameView::repaintContentRectangle):
3192         (WebCore::FrameView::shouldUpdate):
3193         * page/FrameView.h:
3194         * platform/HostWindow.h:
3195         * platform/ScrollView.cpp:
3196         (WebCore::ScrollView::scrollContents):
3197         (WebCore::ScrollView::scrollContentsSlowPath):
3198         (WebCore::ScrollView::repaintContentRectangle):
3199         (WebCore::ScrollView::updateOverhangAreas):
3200         (WebCore::ScrollView::addPanScrollIcon):
3201         (WebCore::ScrollView::removePanScrollIcon):
3202         (WebCore::ScrollView::platformRepaintContentRectangle):
3203         * platform/ScrollView.h:
3204         * rendering/RenderBox.cpp:
3205         (WebCore::RenderBox::repaintLayerRectsForImage):
3206         * rendering/RenderFlowThread.cpp:
3207         (WebCore::RenderFlowThread::repaintRectangleInRegions):
3208         * rendering/RenderFlowThread.h:
3209         * rendering/RenderLayer.cpp:
3210         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
3211         * rendering/RenderLayer.h:
3212         * rendering/RenderMultiColumnSet.cpp:
3213         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
3214         * rendering/RenderMultiColumnSet.h:
3215         * rendering/RenderObject.cpp:
3216         (WebCore::RenderObject::repaintUsingContainer):
3217         (WebCore::RenderObject::repaint):
3218         (WebCore::RenderObject::repaintRectangle):
3219         (WebCore::RenderObject::repaintSlowRepaintObject):
3220         * rendering/RenderObject.h:
3221         * rendering/RenderRegion.cpp:
3222         (WebCore::RenderRegion::repaintFlowThreadContent):
3223         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
3224         * rendering/RenderRegion.h:
3225         * rendering/RenderView.cpp:
3226         (WebCore::RenderView::repaintViewRectangle):
3227         (WebCore::RenderView::flushAccumulatedRepaintRegion):
3228         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers):
3229         * rendering/RenderView.h:
3230         * svg/graphics/SVGImageChromeClient.h:
3231
3232 2014-02-24  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
3233
3234         Code cleanup: remove leftover ENABLE(WORKERS) macros and support.
3235         https://bugs.webkit.org/show_bug.cgi?id=129255
3236
3237         Reviewed by Csaba Osztrogonác.
3238
3239         ENABLE_WORKERS macro was removed in r159679, but r161589 added back some occurrences.
3240         Support is now also removed from xcconfig files.
3241
3242         No new tests needed.
3243
3244         * Configurations/FeatureDefines.xcconfig:
3245         * platform/ThreadGlobalData.cpp:
3246         * platform/ThreadGlobalData.h:
3247         * platform/Timer.h:
3248         (WebCore::TimerBase::isActive):
3249         * platform/ios/wak/WebCoreThread.mm:
3250         (RunWebThread):
3251         (StartWebThread):
3252
3253 2014-02-24  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
3254
3255         [CMake] Get rid of "FIXME: The Blackberry port ..." from WebCore/CmakeLists.txt
3256         https://bugs.webkit.org/show_bug.cgi?id=129152
3257
3258         Reviewed by Gyuyoung Kim.
3259
3260         * CMakeLists.txt:
3261
3262 2014-02-24  David Kilzer  <ddkilzer@apple.com>
3263
3264         Remove redundant setting in FeatureDefines.xcconfig
3265
3266         * Configurations/FeatureDefines.xcconfig:
3267
3268 2014-02-24  Mihai Tica  <mitica@adobe.com>
3269
3270         [CSS Blending] An element having -webkit-mix-blend-mode should only blend with the contents of the parent stacking context
3271         https://bugs.webkit.org/show_bug.cgi?id=129154
3272
3273         Reviewed by Dean Jackson.
3274
3275         The blending operation of an element having -webkit-mix-blend-mode should be restricted to the parent stacking context.
3276         This change isolates blending, preventing it from blending with other underlying elements besides the parent stacking context.
3277
3278         Tests: css3/compositing/blend-mode-isolated-group-1.html
3279                css3/compositing/blend-mode-isolated-group-2.html
3280                css3/compositing/blend-mode-isolated-group-3.html
3281
3282         * rendering/RenderLayer.cpp:
3283         (WebCore::RenderLayer::RenderLayer): Initialize added members to false.
3284         (WebCore::RenderLayer::updateBlendMode): Check if a blend mode was set or unset. If so, set the m_updateParentStackingContextShouldIsolateBlendingDirty to true.
3285         (WebCore::RenderLayer::updateParentStackingContextShouldIsolateBlending): Traverse to the parent stacking context and update the
3286         m_isolatesBlending member accordingly.
3287         * rendering/RenderLayer.h:
3288         - Add isolatesBlending() as a condition for creating a transparency layer in the paintsWithTransparency method.
3289         - Add m_updateParentStackingContextShouldIsolateBlendingDirty member.
3290         - Add m_isolatesBlending member and getter.
3291         * rendering/RenderLayerCompositor.cpp:
3292         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Call updateParentStackingContextShouldIsolateBlending. 
3293
3294 2014-02-24  Krzysztof Czech  <k.czech@samsung.com>
3295
3296         [ATK] Wrong selected element at a given index in a list box.
3297         https://bugs.webkit.org/show_bug.cgi?id=129039
3298
3299         Reviewed by Chris Fleizach.
3300
3301         Test: accessibility/select-element-at-index.html
3302
3303         The selected element at a given index was wrong. One should be considered among the
3304         all children of a list box, not only selected ones.
3305
3306         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
3307         (core):
3308         (listObjectForSelection):
3309         (optionFromList):
3310         (optionFromSelection):
3311         (webkitAccessibleSelectionRefSelection):
3312
3313 2014-02-23  Dean Jackson  <dino@apple.com>
3314
3315         [WebGL] Allow ANGLE to initialize unused varyings
3316         https://bugs.webkit.org/show_bug.cgi?id=129240
3317         <rdar://problem/15203342>
3318
3319         Reviewed by Sam Weinig.
3320
3321         Covered by: conformance/glsl/misc/shaders-with-varyings.html
3322
3323         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3324         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
3325         Add SH_INIT_VARYINGS_WITHOUT_STATIC_USE to compiler flags.
3326
3327 2014-02-23  Sam Weinig  <sam@webkit.org>
3328
3329         Update FeatureDefines.xcconfig
3330
3331         Rubber-stamped by Anders Carlsson.
3332
3333         * Configurations/FeatureDefines.xcconfig:
3334
3335 2014-02-23  Dean Jackson  <dino@apple.com>
3336
3337         Sort the project file with sort-Xcode-project-file.
3338
3339         Rubber-stamped by Sam Weinig.
3340
3341         * WebCore.xcodeproj/project.pbxproj:
3342
3343 2014-02-23  Sam Weinig  <sam@webkit.org>
3344
3345         Fix incorrectly commented out code.
3346
3347         * platform/TelephoneNumberDetector.h:
3348
3349 2014-02-23  Sam Weinig  <sam@webkit.org>
3350
3351         Extract platform specific parts of telephone number detection 
3352         https://bugs.webkit.org/show_bug.cgi?id=129238
3353
3354         Reviewed by Dean Jackson.
3355
3356         * WebCore.xcodeproj/project.pbxproj:
3357         Add new files.
3358
3359         * html/parser/HTMLTreeBuilder.cpp:
3360         (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers):
3361         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
3362         * platform/TelephoneNumberDetector.h: Added.
3363         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp: Added.
3364         (WebCore::TelephoneNumberDetector::phoneNumbersScanner):
3365         (WebCore::TelephoneNumberDetector::isSupported):
3366         (WebCore::TelephoneNumberDetector::find):
3367         Move code to TelephoneNumberDetector.
3368
3369 2014-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3370
3371         Change a url parameter type with URL in NavigatorContentUtils
3372         https://bugs.webkit.org/show_bug.cgi?id=129202
3373
3374         Reviewed by Sam Weinig.
3375
3376         It would be good if we use *URL* for url parameters instead of using String.
3377
3378         Merge from blink. https://src.chromium.org/viewvc/blink?view=rev&revision=165458.
3379
3380         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
3381         (WebCore::verifyCustomHandlerURL):
3382         (WebCore::NavigatorContentUtils::registerProtocolHandler):
3383         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
3384         (WebCore::NavigatorContentUtils::unregisterProtocolHandler):
3385         * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
3386
3387 2014-02-23  Dean Jackson  <dino@apple.com>
3388
3389         Update ANGLE to 836bd2176e5607b14846cf1fbc5932dbc91318f4
3390         https://bugs.webkit.org/show_bug.cgi?id=129232
3391
3392         Reviewed by Brent Fulgham.
3393
3394         New files added, derived sources compiled directly, and generated
3395         steps removed for both EFL and GTK, with much-needed help from
3396         Sergio Correia.
3397
3398         * CMakeLists.txt:
3399         * GNUMakefile.am:
3400
3401 2014-02-23  Sam Weinig  <sam@webkit.org>
3402
3403         Move RenderMathMLMenclose.h/cpp to the right place in the Xcode project and sort.
3404
3405         Rubber-stamped by Anders Carlsson.
3406
3407         * WebCore.xcodeproj/project.pbxproj:
3408
3409 2014-02-23  Sam Weinig  <sam@webkit.org>
3410
3411         Move telephone number detection behind its own ENABLE macro
3412         https://bugs.webkit.org/show_bug.cgi?id=129236
3413
3414         Reviewed by Dean Jackson.
3415
3416         * Configurations/FeatureDefines.xcconfig:
3417         Add ENABLE_TELEPHONE_NUMBER_DETECTION.
3418
3419         * dom/Document.cpp:
3420         (WebCore::Document::Document):
3421         * dom/Document.h:
3422         * html/parser/HTMLConstructionSite.h:
3423         * html/parser/HTMLTreeBuilder.cpp:
3424         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
3425         * html/parser/HTMLTreeBuilder.h:
3426         Use ENABLE(TELEPHONE_NUMBER_DETECTION).
3427
3428         * platform/mac/SoftLinking.h:
3429         Remove PLATOFORM(IOS) from SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL, it is not iOS specific.
3430
3431 2014-02-23  Zalan Bujtas  <zalan@apple.com>
3432
3433         Subpixel rendering: Fix bleed avoidance subpixel calculation.
3434         https://bugs.webkit.org/show_bug.cgi?id=129225
3435
3436         Reviewed by Simon Fraser.
3437         
3438         static_cast<LayoutUnit>(int value) only produces the desired result when subpixel is off.
3439
3440         Currently not testable.
3441
3442         * rendering/RenderBoxModelObject.cpp:
3443         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
3444         (WebCore::shrinkRectByOneDevicePixel):
3445         (WebCore::RenderBoxModelObject::borderInnerRectAdjustedForBleedAvoidance):
3446         (WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance):
3447         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3448         * rendering/RenderBoxModelObject.h:
3449
3450 2014-02-23  Zalan Bujtas  <zalan@apple.com>
3451
3452         Subpixel rendering: Add devicepixel based computation to BorderEdge class.
3453         https://bugs.webkit.org/show_bug.cgi?id=129224
3454
3455         Reviewed by Simon Fraser.
3456
3457         To produce correct width (and type) results, BorderEdge class needs to take device pixel ratio into account.
3458
3459         Currently not testable.
3460
3461         * rendering/RenderBoxModelObject.cpp:
3462         (WebCore::BorderEdge::BorderEdge):
3463         (WebCore::BorderEdge::obscuresBackgroundEdge):
3464         (WebCore::BorderEdge::getDoubleBorderStripeWidths): this does not always produce the same
3465         result as before, but the sum of inner and outer is not different.
3466         (WebCore::BorderEdge::borderWidthInDevicePixel):
3467         (WebCore::RenderBoxModelObject::getBorderEdgeInfo):
3468
3469 2014-02-22  Dan Bernstein  <mitz@apple.com>
3470
3471         REGRESSION (r164507): Crash beneath JSGlobalObjectInspectorController::reportAPIException at facebook.com, twitter.com, youtube.com
3472         https://bugs.webkit.