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