HTMLFrameOwnerElement should obey the SubframeLoadingDisabler when creating subframes
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-21  Andreas Kling  <akling@apple.com>
2
3         HTMLFrameOwnerElement should obey the SubframeLoadingDisabler when creating subframes
4         <rdar://problem/15675780>
5
6         Merge Blink r156744 by Adam Klein.
7
8         Test: fast/frames/set-iframe-src-in-pagehide-crash.html
9
10         * loader/SubframeLoader.cpp:
11         (WebCore::SubframeLoader::loadSubframe):
12
13 2014-03-21  Darin Adler  <darin@apple.com>
14
15         Improve idiom used for string building in a few places
16         https://bugs.webkit.org/show_bug.cgi?id=130561
17
18         Reviewed by Andreas Kling.
19
20         * Modules/indexeddb/IDBKeyData.cpp:
21         (WebCore::IDBKeyData::loggingString): Use a StringBuilder, and get rid of
22         an an unnecessary additional string allocation.
23
24         * Modules/websockets/ThreadableWebSocketChannel.cpp:
25         (WebCore::ThreadableWebSocketChannel::create): Use StringBuilder.
26
27         * html/FTPDirectoryDocument.cpp:
28         (WebCore::FTPDirectoryDocumentParser::createTDForFilename): Do a more efficient
29         string concatenation.
30         * html/ValidationMessage.cpp:
31         (WebCore::ValidationMessage::updateValidationMessage): Ditto.
32
33         * inspector/InspectorApplicationCacheAgent.cpp:
34         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
35         Use a StringBuilder.
36
37         * inspector/InspectorStyleSheet.cpp: 
38         (WebCore::InspectorStyle::shorthandValue): Use a StringBuilder.
39
40         * inspector/InspectorStyleTextEditor.cpp:
41         (WebCore::InspectorStyleTextEditor::insertProperty): Use a more efficient idiom
42         for string concatenation.
43         (WebCore::InspectorStyleTextEditor::internalReplaceProperty): Ditto.
44         * loader/FormSubmission.cpp:
45         (WebCore::appendMailtoPostFormDataToURL): Ditto.
46
47         * page/Frame.cpp:
48         (WebCore::createRegExpForLabels): Use a StringBuilder.
49
50         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
51         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Use a more efficient
52         idiom for string concatenation.
53
54         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
55         (WebCore::GraphicsContext3D::getUnmangledInfoLog): Use a StringBuilder.
56
57         * platform/network/MIMEHeader.cpp:
58         (WebCore::MIMEHeader::parseHeader): Use a more efficient idiom for string
59         concatenation.
60         * platform/network/ResourceResponseBase.cpp:
61         (WebCore::ResourceResponseBase::addHTTPHeaderField): Ditto.
62         * rendering/RenderLayerCompositor.cpp:
63         (WebCore::RenderLayerCompositor::layerTreeAsText): Ditto.
64
65         * rendering/RenderText.cpp:
66         (WebCore::RenderText::secureText): Create a new string with the substring
67         function rather than with the append function.
68
69         * xml/XMLHttpRequest.cpp:
70         (WebCore::XMLHttpRequest::setRequestHeaderInternal): Use a more efficient idiom
71         for string concatenation.
72
73 2014-03-21  Darin Adler  <darin@apple.com>
74
75         Add a combined decodeAndFlush to TextResourceDecoder
76         https://bugs.webkit.org/show_bug.cgi?id=130560
77
78         Reviewed by Andreas Kling.
79
80         * WebCore.exp.in: Added new symbol for decodeAndFlush. Also re-did
81         the geometry types #if so it would sort more logically.
82
83         * fileapi/FileReaderLoader.cpp:
84         (WebCore::FileReaderLoader::convertToText): Use decodeAndFlush.
85         * inspector/InspectorPageAgent.cpp:
86         (WebCore::InspectorPageAgent::cachedResourceContent): Ditto.
87         * inspector/NetworkResourcesData.cpp:
88         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent): Ditto.
89
90         * loader/TextResourceDecoder.cpp:
91         (WebCore::TextResourceDecoder::decodeAndFlush): Added.
92         * loader/TextResourceDecoder.h: Ditto.
93
94         * loader/appcache/ManifestParser.cpp:
95         (WebCore::parseManifest): Use decodeAndFlush.
96         * loader/cache/CachedCSSStyleSheet.cpp:
97         (WebCore::CachedCSSStyleSheet::sheetText): Ditto.
98         (WebCore::CachedCSSStyleSheet::finishLoading): Ditto.
99
100         * loader/cache/CachedFont.cpp:
101         (WebCore::CachedFont::ensureSVGFontData): Use decodeAndFlush. Also use nullptr.
102         (WebCore::CachedFont::getSVGFontById): Use descendantsOfType<SVGFontElement>
103         instead of using a NodeList. Much more efficient!
104
105         * loader/cache/CachedSVGDocument.cpp:
106         (WebCore::CachedSVGDocument::finishLoading): Use decodeAndFlush.
107         * loader/cache/CachedScript.cpp:
108         (WebCore::CachedScript::script): Ditto.
109         * loader/cache/CachedXSLStyleSheet.cpp:
110         (WebCore::CachedXSLStyleSheet::finishLoading): Ditto.
111         * page/Page.cpp:
112         (WebCore::Page::userStyleSheet): Ditto.
113
114 2014-03-20  Darin Adler  <darin@apple.com>
115
116         Remove a couple of unused functions from CSSOMUtils
117         https://bugs.webkit.org/show_bug.cgi?id=130558
118
119         Reviewed by Andreas Kling.
120
121         * css/CSSOMUtils.cpp: Remove String overloads. Callers all use the StringBuilder
122         ones, which is good since that is a more efficient idiom.
123         * css/CSSOMUtils.h: Ditto.
124
125 2014-03-20  Pratik Solanki  <psolanki@apple.com>
126
127         Unreviewed. iOS build fix after r166017, r166032.
128
129         * platform/ScrollView.cpp:
130         (WebCore::ScrollView::visibleContentRectInternal):
131
132 2014-03-20  Hyowon Kim  <hw1008.kim@samsung.com>
133
134         Move to using std::unique_ptr for EFL objects.
135         https://bugs.webkit.org/show_bug.cgi?id=129853
136
137         Reviewed by Gyuyoung Kim.
138
139         EflUniquePtr is a template alias of std::unique_ptr
140         with a custom deleter for each Efl Objects, which is motivated by GUniquePtr.
141         This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr.
142
143         No new tests. No new functionality.
144
145         * platform/efl/EflScreenUtilities.h:
146         * platform/efl/RenderThemeEfl.cpp:
147         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
148         (WebCore::RenderThemeEfl::loadTheme):
149         * platform/efl/RenderThemeEfl.h:
150         * platform/graphics/Icon.h:
151         * platform/graphics/efl/EvasGLContext.h:
152         (WebCore::EvasGLContext::create):
153         * platform/graphics/efl/EvasGLSurface.h:
154         (WebCore::EvasGLSurface::create):
155
156 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
157
158         [EFL][GTK] Get CMake to find Freetype2 properly
159         https://bugs.webkit.org/show_bug.cgi?id=130150
160
161         Reviewed by Martin Robinson.
162
163         Newer versions of CMake are not able to find Freetype2 correctly.
164         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
165         freetype2 repo, because a completely different version number is found in freetype2.pc.
166
167         * PlatformEfl.cmake:
168         * PlatformGTK.cmake:
169
170 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
171
172         [GTK] Suppress errors about using gdk_threads_enter gdk_threads_leave
173         https://bugs.webkit.org/show_bug.cgi?id=130517
174
175         Reviewed by Sergio Villar Senin.
176
177         * plugins/gtk/gtk2xtbin.c: Use GCC suppression to suppress errors about deprecations.
178
179 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
180
181         Cleanup in aisle r166017.
182         
183         visibleContentRectInternal() was dropping the scrollbar
184         inclusiveness on the floor, and we need to reset the top inset
185         between tests.
186
187         * platform/ScrollView.cpp:
188         (WebCore::ScrollView::visibleContentRectInternal):
189         * testing/Internals.cpp:
190         (WebCore::Internals::resetToConsistentState):
191
192 2014-03-20  Enrica Casucci  <enrica@apple.com>
193
194         Build fix.
195
196         Removing unused variable.
197         
198         * page/FrameView.cpp:
199         (WebCore::FrameView::didPaintContents):
200
201 2014-03-20  Brent Fulgham  <bfulgham@apple.com>
202
203         Rename TextTrackRegion/TextTrackRegionList to VTTRegion/VTTRegionList
204         https://bugs.webkit.org/show_bug.cgi?id=130543
205
206         Reviewed by Dean Jackson.
207
208         Merged from Blink (patch by philipj@opera.com):
209         https://chromium.googlesource.com/chromium/blink/+/69ee6d3399d64163e4936ac1bde222036c54c4b8
210         http://crbug.com/55653003
211
212         Tests: media/track/regions-webvtt/vtt-region-constructor.html
213                media/track/regions-webvtt/vtt-region-display.html
214                media/track/regions-webvtt/vtt-region-dom-layout.html
215                media/track/regions-webvtt/vtt-region-list.html
216                media/track/regions-webvtt/vtt-region-parser.html
217
218         * Configurations/FeatureDefines.xcconfig:
219         * DerivedSources.make:
220         * WebCore.xcodeproj/project.pbxproj:
221         * html/shadow/MediaControlElements.cpp:
222         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
223         * html/track/LoadableTextTrack.cpp:
224         (WebCore::LoadableTextTrack::newRegionsAvailable):
225         * html/track/TextTrack.cpp:
226         (WebCore::TextTrack::ensureVTTRegionList):
227         (WebCore::TextTrack::regions):
228         (WebCore::TextTrack::addRegion):
229         (WebCore::TextTrack::removeRegion):
230         * html/track/TextTrack.h:
231         * html/track/TextTrack.idl:
232         * html/track/TextTrackCue.cpp:
233         * html/track/TextTrackRegion.cpp: Removed.
234         * html/track/TextTrackRegion.h: Removed.
235         * html/track/TextTrackRegion.idl: Removed.
236         * html/track/TextTrackRegionList.cpp: Removed.
237         * html/track/TextTrackRegionList.h: Removed.
238         * html/track/TextTrackRegionList.idl: Removed.
239         * html/track/VTTCue.cpp:
240         (WebCore::VTTCue::removeDisplayTree):
241         * html/track/VTTRegion.cpp: Copied from Source/WebCore/html/track/TextTrackRegion.cpp.
242         (WebCore::VTTRegion::VTTRegion):
243         (WebCore::VTTRegion::~VTTRegion):
244         (WebCore::VTTRegion::setTrack):
245         (WebCore::VTTRegion::setId):
246         (WebCore::VTTRegion::setWidth):
247         (WebCore::VTTRegion::setHeight):
248         (WebCore::VTTRegion::setRegionAnchorX):
249         (WebCore::VTTRegion::setRegionAnchorY):
250         (WebCore::VTTRegion::setViewportAnchorX):
251         (WebCore::VTTRegion::setViewportAnchorY):
252         (WebCore::VTTRegion::scroll):
253         (WebCore::VTTRegion::setScroll):
254         (WebCore::VTTRegion::updateParametersFromRegion):
255         (WebCore::VTTRegion::setRegionSettings):
256         (WebCore::VTTRegion::getSettingFromString):
257         (WebCore::VTTRegion::parseSettingValue):
258         (WebCore::VTTRegion::parseSetting):
259         (WebCore::VTTRegion::textTrackCueContainerScrollingClass):
260         (WebCore::VTTRegion::textTrackCueContainerShadowPseudoId):
261         (WebCore::VTTRegion::textTrackRegionShadowPseudoId):
262         (WebCore::VTTRegion::appendTextTrackCueBox):
263         (WebCore::VTTRegion::displayLastTextTrackCueBox):
264         (WebCore::VTTRegion::willRemoveTextTrackCueBox):
265         (WebCore::VTTRegion::getDisplayTree):
266         (WebCore::VTTRegion::prepareRegionDisplayTree):
267         (WebCore::VTTRegion::startTimer):
268         (WebCore::VTTRegion::stopTimer):
269         (WebCore::VTTRegion::scrollTimerFired):
270         * html/track/VTTRegion.h: Copied from Source/WebCore/html/track/TextTrackRegion.h.
271         (WebCore::VTTRegion::create):
272         * html/track/VTTRegion.idl: Copied from Source/WebCore/html/track/TextTrackRegion.idl.
273         * html/track/VTTRegionList.cpp: Copied from Source/WebCore/html/track/TextTrackRegionList.cpp.
274         (WebCore::VTTRegionList::VTTRegionList):
275         (WebCore::VTTRegionList::length):
276         (WebCore::VTTRegionList::item):
277         (WebCore::VTTRegionList::getRegionById):
278         (WebCore::VTTRegionList::add):
279         (WebCore::VTTRegionList::remove):
280         (WebCore::VTTRegionList::clear):
281         * html/track/VTTRegionList.h: Copied from Source/WebCore/html/track/TextTrackRegionList.h.
282         (WebCore::VTTRegionList::create):
283         (WebCore::VTTRegionList::~VTTRegionList):
284         * html/track/VTTRegionList.idl: Copied from Source/WebCore/html/track/TextTrackRegionList.idl.
285         * html/track/WebVTTParser.cpp:
286         (WebCore::WebVTTParser::parseFloatPercentageValue):
287         (WebCore::WebVTTParser::getNewRegions):
288         (WebCore::WebVTTParser::createNewRegion):
289         * html/track/WebVTTParser.h:
290         * loader/TextTrackLoader.cpp:
291         (WebCore::TextTrackLoader::getNewRegions):
292         * loader/TextTrackLoader.h:
293
294 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
295
296         Fix the iOS build.
297
298         * page/FrameView.cpp:
299         (WebCore::FrameView::willPaintContents):
300         (WebCore::FrameView::didPaintContents):
301
302 2014-03-20  Hans Muller  <hmuller@adobe.com>
303
304         [CSS Shapes] clamp RasterShape shapeMargin to reference box size
305         https://bugs.webkit.org/show_bug.cgi?id=130350
306
307         Reviewed by Dean Jackson.
308
309         Corrected the way the maximum shape-margin value was computed for image valued
310         shapes. The limiting case is an image with just one above threshold pixel. The
311         largest possible value for shapeMargin is the radius of a circle that encloses
312         the size of the shape-outside element's margin-box, since the shape-outside's
313         boundary is clipped to the margin-box. The radius is just sqrt(2) * the margin-box's
314         largest dimension.
315
316         Also cleaned up up a few poorly named parameters.
317
318         Test: fast/shapes/shape-outside-floats/shape-outside-one-pixel.html
319
320         * rendering/shapes/RasterShape.cpp:
321         (WebCore::RasterShape::marginIntervals):
322         * rendering/shapes/RasterShape.h:
323         (WebCore::RasterShape::RasterShape):
324         * rendering/shapes/Shape.h:
325
326 2014-03-20  Beth Dakin  <bdakin@apple.com>
327
328         Build fix.
329
330         * page/FrameView.cpp:
331         (WebCore::FrameView::paintContents):
332
333 2014-03-20  Beth Dakin  <bdakin@apple.com>
334
335         Implement contentInset for Mac WebKit2
336         https://bugs.webkit.org/show_bug.cgi?id=130273
337
338         Reviewed by Simon Fraser.
339
340         This patch adds support for topContentInset(). If a page has a topContentInset(), 
341         the root layer’s position is adjusted to account for the inset. It is assumed that 
342         the area accounted for by the inset is visible but obscured, so scrollbars need to 
343         be moved so that they only cover the non-obscured area, and most parts of WebCore 
344         that wonder about visibleContentSize only care about the unobscured area, so this 
345         patch makes that visibleContentRect return the unobscuredRect. Finally since this 
346         is achieved by moving a layer’s position, the topContentInset() also needs to be 
347         factored into various functions that are used to convert between coordinate 
348         spaces. 
349
350         Return Page::topContentInset() if this is the main frame.
351         * page/FrameView.cpp:
352         (WebCore::FrameView::topContentInset):
353         * page/FrameView.h:
354
355         Cache the inset on Page.
356         * page/Page.cpp:
357         (WebCore::Page::Page):
358         * page/Page.h:
359         (WebCore::Page::topContentInset):
360         (WebCore::Page::setTopContentInset):
361
362         unobscuredContentRect() used to unconditionally return visibleContentRect() on 
363         non-iOS platforms. Now that it is possible for some technically visible content to 
364         be obscured, this code needed to be re-worked a bit to make some more sense. 
365         visibleContentRect() now represents that visible content that is completely 
366         unobscured, so it should call into unobscuredContentRect() rather than the other 
367         way around.
368         * platform/ScrollView.cpp:
369         (WebCore::ScrollView::unobscuredContentRect):
370
371         unscaledTotalVisibleContentSize() includes the size of all content that might be 
372         visible. Some of this content might be obscured.
373         (WebCore::ScrollView::unscaledTotalVisibleContentSize):
374
375         Most of the time, we only care about the content that is FULLY visible. That is 
376         what you get from unscaledUnobscuredVisibleContentSize().
377         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
378
379         Use the unobscured size for these computations.
380         (WebCore::ScrollView::visibleContentRectInternal):
381         (WebCore::ScrollView::layoutSize):
382
383         Factor in the topContentInset().
384         (WebCore::ScrollView::scrollOffsetRelativeToDocument):
385         (WebCore::ScrollView::scrollPositionRelativeToDocument):
386
387         The scrollbars should be positioned to cover the non-obscured content only. 
388         (WebCore::ScrollView::updateScrollbars):
389
390         Again, factor the topContentInset() into these conversions since the root layer’s 
391         position has been adjusted to account for it.
392         (WebCore::ScrollView::contentsToRootView):
393         (WebCore::ScrollView::contentsToWindow):
394
395          Just like the scrollbars, the scroll corner must be moved the account for the 
396         inset.
397         (WebCore::ScrollView::scrollCornerRect):
398         * platform/ScrollView.h:
399         (WebCore::ScrollView::topContentInset):
400
401         RenderLayerCompositor cares about unscaledTotalVisibleContentSize(). It does not 
402         care if some of that content is obscured.
403         * rendering/RenderLayerCompositor.cpp:
404         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
405
406         Move the root layer’s position based on the contentInset.
407         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
408         (WebCore::RenderLayerCompositor::ensureRootLayer):
409
410         Allow setting contentInset via Internals for testing purposes.
411         * testing/Internals.cpp:
412         (WebCore::Internals::setTopContentInset):
413         * testing/Internals.h:
414         * testing/Internals.idl:
415
416 2014-03-20  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
417
418         Optimize RenderTable::colToEffCol() for tables without colspans
419         https://bugs.webkit.org/show_bug.cgi?id=129298
420
421         Reviewed by Simon Fraser.
422
423         Create an alternative fast path to RenderTable colToEffCol() and effColToCol()
424         when there is no colspan or colspan does not exceed the width of table.
425         Blink merge https://codereview.chromium.org/154243002 by rhogan
426
427         * rendering/RenderTable.cpp:
428         (WebCore::RenderTable::RenderTable):
429         (WebCore::RenderTable::appendColumn):
430         (WebCore::RenderTable::recalcSections):
431         * rendering/RenderTable.h:
432         (WebCore::RenderTable::colToEffCol):
433         (WebCore::RenderTable::effColToCol):
434         (WebCore::RenderTable::hasCellColspanThatDeterminesTableWidth):
435
436 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
437
438         FrameView::paintContents() is not called for composited content
439         https://bugs.webkit.org/show_bug.cgi?id=130541
440
441         Reviewed by Beth Dakin.
442
443         FrameView::paintContents() is not called for frames that have
444         composited contents, yet it contains code that is expected
445         to run for all Frames.
446         
447         Fix by factoring into will/didPaintContents(), and calling
448         the will/did functions from RenderLayerBacking::paintIntoLayer().
449         
450         Also add a SetLayoutNeededForbiddenScope check for composited-layer
451         painting.
452
453         * page/FrameView.cpp:
454         (WebCore::FrameView::updateControlTints):
455         (WebCore::FrameView::willPaintContents):
456         (WebCore::FrameView::didPaintContents):
457         (WebCore::FrameView::paintContents):
458         * page/FrameView.h:
459         * rendering/RenderLayerBacking.cpp:
460         (WebCore::RenderLayerBacking::paintIntoLayer):
461
462 2014-03-20  Tim Horton  <timothy_horton@apple.com>
463
464         Fix the Mountain Lion build.
465
466         * platform/graphics/cocoa/IOSurface.mm:
467         (IOSurface::setIsPurgeable):
468
469 2014-03-20  Brian Burg  <bburg@apple.com>
470
471         Web Replay: capture and replay mouse events
472         https://bugs.webkit.org/show_bug.cgi?id=129395
473
474         Reviewed by Joseph Pecoraro.
475
476         Add support for capturing and replaying mouse inputs that come from WebKit2.
477         Hook up the UserInputBridge to session state changes in the ReplayController so
478         that the bridge knows when to capture or deny mouse inputs.
479
480         Test: ManualTests/inspector/replay-mouse-events.html
481
482         * platform/PlatformEvent.h: Give explicit storage types to Modifiers and Type enums
483         so they can be forward-declared.
484         * platform/PlatformMouseEvent.h: Give an explicit storage type to enum MouseButton.
485         Add operator== and operator!= for MouseButton to work around an MSVC bug.
486
487         * replay/ReplayController.cpp: Perform session state changes in a helper function, and
488         at the same time change the state of the page's user input bridge.
489         (WebCore::ReplayController::setSessionState):
490         (WebCore::ReplayController::startCapturing):
491         (WebCore::ReplayController::stopCapturing):
492         (WebCore::ReplayController::startPlayback):
493         (WebCore::ReplayController::cancelPlayback):
494
495         * replay/ReplayInputDispatchMethods.cpp: Add dispatch methods for new inputs.
496         (WebCore::HandleMouseMove::dispatch):
497         (WebCore::HandleMousePress::dispatch):
498         (WebCore::HandleMouseRelease::dispatch):
499
500         * replay/SerializationMethods.cpp: Add helper macros so that encode/decode methods look
501         symmetric with one data member per line. This helps reduce unintentional inconsistencies.
502         (JSC::EncodingTraits<PlatformMouseEvent>::encodeValue): Added.
503         (JSC::EncodingTraits<PlatformMouseEvent>::decodeValue): Added.
504         * replay/SerializationMethods.h:
505
506         * replay/UserInputBridge.cpp: Fill in the bridge method implementations for mouse
507         events, adding helpers and macros as necessary to reduce boilerplate.
508         (WebCore::UserInputBridge::activeCursor): Added.
509         (WebCore::UserInputBridge::handleMousePressEvent):
510         (WebCore::UserInputBridge::handleMouseReleaseEvent):
511         (WebCore::UserInputBridge::handleMouseMoveEvent):
512         (WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
513
514         * replay/UserInputBridge.h: Add a bridge state enum along with getters and setters.
515         The enum value controls whether the bridge should capture commands, deny non-synthetic
516         commands (from the user), or allow anything to pass (the default).
517         (WebCore::UserInputBridge::setState): Added.
518         (WebCore::UserInputBridge::state): Added.
519
520         * replay/WebInputs.json: Add inputs HandleMouseMove, HandleMousePress, HandleMouseRelease.
521         Add enum definitions for PlatformEvent::Type, PlatformEvent::Modifiers, and PlatformMouseEvent::MouseButton.
522         Alphabetize the existing data type definitions.
523
524 2014-03-20  Tim Horton  <timothy_horton@apple.com>
525
526         Add WebCore::IOSurface wrapper
527         https://bugs.webkit.org/show_bug.cgi?id=130529
528
529         Reviewed by Simon Fraser.
530
531         * WebCore.exp.in:
532         * WebCore.xcodeproj/project.pbxproj:
533         * platform/graphics/cg/ColorCG.cpp:
534         * platform/graphics/cg/GraphicsContextCG.h:
535         (WebCore::cachedCGColorSpace):
536         Move cachedCGColorSpace out so that other clients of GraphicsContextCG
537         can use its mapping from WebCore::ColorSpace -> CGColorSpaceRef.
538
539         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp:
540         * platform/graphics/cg/ImageBufferCG.cpp:
541         Add FIXMEs for ImageBuffer to adopt WebCore::IOSurface.
542
543         * platform/graphics/cocoa/IOSurface.h: Added.
544         * platform/graphics/cocoa/IOSurface.mm: Added.
545         (IOSurface::create):
546         (IOSurface::createFromMachPort):
547         (IOSurface::createFromSurface):
548         (IOSurface::IOSurface):
549         (IOSurface::maximumSize):
550         (IOSurface::createMachPort):
551         (IOSurface::createImage):
552         (IOSurface::ensurePlatformContext):
553         (IOSurface::ensureGraphicsContext):
554         (IOSurface::state):
555         (IOSurface::isPurgeable):
556         (IOSurface::setIsPurgeable):
557         (IOSurface::inUse):
558         Add WebCore::IOSurface.
559
560 2014-03-20  Pratik Solanki  <psolanki@apple.com>
561
562         iOS build fix after r165992.
563
564         * generate-export-file:
565         (preprocessorMacros):
566
567 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
568
569         [WebRTC] Moving RTCConfiguration and RTCIceServer to Modules/mediastream
570         https://bugs.webkit.org/show_bug.cgi?id=130434
571
572         Reviewed by Eric Carlson.
573
574         Those classes are defined in WebRTC spec, so they should not be in platform layer.
575         Adding a platform implementation to be passed to handler classes.
576
577         * Modules/mediastream/RTCConfiguration.h: Copied from Source/WebCore/platform/mediastream/RTCConfiguration.h.
578         * Modules/mediastream/RTCIceServer.h: Copied from Source/WebCore/platform/mediastream/RTCIceServer.h.
579         * Modules/mediastream/RTCPeerConnection.cpp:
580         (WebCore::RTCPeerConnection::RTCPeerConnection):
581         (WebCore::RTCPeerConnection::updateIce):
582         * WebCore.xcodeproj/project.pbxproj:
583         * platform/mediastream/RTCConfigurationPrivate.h: Added.
584         * platform/mediastream/RTCIceServerPrivate.h: Added.
585         * platform/mediastream/RTCPeerConnectionHandler.h:
586         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
587         (WebCore::RTCPeerConnectionHandlerMock::initialize):
588         (WebCore::RTCPeerConnectionHandlerMock::updateIce):
589         * platform/mock/RTCPeerConnectionHandlerMock.h:
590
591 2014-03-20  Alex Christensen  <achristensen@webkit.org>
592
593         [WinCairo] Unreviewed speculative build after my r165996.
594
595         * platform/network/soup/AuthenticationChallengeSoup.cpp:
596         * platform/network/soup/CertificateInfo.cpp:
597         * platform/network/soup/CookieJarSoup.cpp:
598         * platform/network/soup/ResourceRequestSoup.cpp:
599         * platform/network/soup/ResourceResponseSoup.cpp:
600         * platform/network/soup/SynchronousLoaderClientSoup.cpp:
601
602 2014-03-20  Brent Fulgham  <bfulgham@apple.com>
603
604         Add a flushing mechanism for the WebVTTParser
605         https://bugs.webkit.org/show_bug.cgi?id=130532
606
607         Reviewed by Eric Carlson.
608
609         Merged from Blink (patch by vcarbune@chromium.org):
610         https://chromium.googlesource.com/chromium/blink/+/1ac2b3081492ab8661429230004013a9a3623f0f
611         http://crbug.com/54203003
612         https://chromium.googlesource.com/chromium/blink/+/24343d32bc36d20d59ef3e10040faddde65929e6
613         http://crbug.com/59453002
614         https://chromium.googlesource.com/chromium/blink/+/ef2793f1d9d207389589ecf9a136ea5c7170b4af
615         http://crbug.com/75233002
616         https://chromium.googlesource.com/chromium/blink/+/a29f2f8324abcd4826b41e7dc34373dee2ec57a9
617         http://crbug.com/52713005
618         https://chromium.googlesource.com/chromium/blink/+/7ce003c8d47b39f116f1f2a592a5dfb4a9e77228
619         http://crbug.com/64303004
620         https://chromium.googlesource.com/chromium/blink/+/18f896b3498478311e880f782813d5dfc8c0c7d1
621         http://crbug.com/96933004
622         https://chromium.googlesource.com/chromium/blink/+/8670e8ecb13254a651f5493ec83f4484d18c154e
623         http://crbug.com/98783005
624         https://chromium.googlesource.com/chromium/blink/+/4ac55780a6af3d76e0159c1d145330964ad56647
625         http://crbug.com/104713002
626
627         Tests: http/tests/media/track/track-webvtt-slow-loading-2.html
628                http/tests/media/track/track-webvtt-slow-loading.html
629
630         * CMakeLists.txt:
631         * GNUmakefile.list.am:
632         * WebCore.vcxproj/WebCore.vcxproj:
633         * WebCore.vcxproj/WebCore.vcxproj.filters:
634         * WebCore.xcodeproj/project.pbxproj:
635         * html/track/BufferedLineReader.cpp: Added.
636         * html/track/BufferedLineReader.h: Added.
637         * html/track/TextTrackRegion.cpp:
638         * html/track/VTTCue.cpp:
639         * html/track/WebVTTParser.cpp:
640         * html/track/WebVTTParser.h:
641         * loader/TextTrackLoader.cpp:
642
643 2014-03-20  Alex Christensen  <achristensen@webkit.org>
644
645         Preparation for using Soup on Windows.
646         https://bugs.webkit.org/show_bug.cgi?id=130472
647
648         Reviewed by Brent Fulgham.
649
650         * WebCore.vcxproj/WebCore.vcxproj:
651         * WebCore.vcxproj/WebCore.vcxproj.filters:
652         Added Soup source to build on WinCairo.
653         * platform/network/curl/CookieJarCurl.cpp:
654         * platform/network/curl/CredentialStorageCurl.cpp:
655         * platform/network/curl/CurlCacheEntry.cpp:
656         * platform/network/curl/CurlCacheManager.cpp:
657         * platform/network/curl/CurlDownload.cpp:
658         * platform/network/curl/DNSCurl.cpp:
659         * platform/network/curl/FormDataStreamCurl.cpp:
660         * platform/network/curl/MultipartHandle.cpp:
661         * platform/network/curl/ProxyServerCurl.cpp:
662         * platform/network/curl/ResourceHandleCurl.cpp:
663         * platform/network/curl/ResourceHandleManager.cpp:
664         * platform/network/curl/SSLHandle.cpp:
665         * platform/network/curl/SocketStreamHandleCurl.cpp:
666         Protected with USE(CURL) to avoid duplicate symbols when linking.
667         * platform/network/soup/AuthenticationChallengeSoup.cpp:
668         * platform/network/soup/CertificateInfo.cpp:
669         * platform/network/soup/CookieJarSoup.cpp:
670         * platform/network/soup/CookieStorageSoup.cpp:
671         * platform/network/soup/CredentialStorageSoup.cpp:
672         * platform/network/soup/DNSSoup.cpp:
673         * platform/network/soup/NetworkStorageSessionSoup.cpp:
674         * platform/network/soup/ProxyResolverSoup.cpp:
675         * platform/network/soup/ProxyServerSoup.cpp:
676         * platform/network/soup/ResourceErrorSoup.cpp:
677         * platform/network/soup/ResourceHandleSoup.cpp:
678         * platform/network/soup/ResourceRequestSoup.cpp:
679         * platform/network/soup/ResourceResponseSoup.cpp:
680         * platform/network/soup/SocketStreamHandleSoup.cpp:
681         * platform/network/soup/SoupNetworkSession.cpp:
682         * platform/network/soup/SynchronousLoaderClientSoup.cpp:
683         Protected with USE(CURL) to avoid duplicate symbols when linking.
684
685 2014-03-20  Pratik Solanki  <psolanki@apple.com>
686
687         iOS build fix after r165979.
688
689         * generate-export-file:
690         (preprocessorMacros):
691
692 2014-03-20  David Hyatt  <hyatt@apple.com>
693
694         [New Multicolumn] getClientRects returns wrong rectangle
695         https://bugs.webkit.org/show_bug.cgi?id=128614
696
697         Reviewed by Sam Weinig.
698
699         Added fast/multicol/newmulticol/client-rects.html and beefed up existing
700         fast/multicol/client-rects.html to use more writing modes.
701
702         * rendering/LayoutState.h:
703         Removed unused function.
704
705         * rendering/RenderFlowThread.h:
706         Make mapFlowToRegion virtual so that RenderMultiColumnFlowThread can
707         override it.
708
709         * rendering/RenderMultiColumnFlowThread.cpp:
710         (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
711         * rendering/RenderMultiColumnFlowThread.h:
712         Implement mapFlowToRegion to correctly translate a flow thread position
713         into a column offset within a region.
714
715         * rendering/RenderMultiColumnSet.cpp:
716         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
717         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
718         * rendering/RenderMultiColumnSet.h:
719         Refactored some code to make a columnTranslationForOffset helper that
720         can be used by RenderMultiColumnFlowThread.
721
722 2014-03-20  Daniel Bates  <dabates@apple.com>
723
724         Preserve original document URL for XSSAuditor reports
725
726         Merged from Blink (patch by Tom Sepez):
727         https://src.chromium.org/viewvc/blink?view=rev&revision=158406
728
729         Test: http/tests/security/xssAuditor/report-script-tag-replace-state.html
730
731         * html/parser/XSSAuditor.cpp:
732         (WebCore::XSSAuditor::filterToken):
733         * html/parser/XSSAuditorDelegate.cpp:
734         (WebCore::buildConsoleError):
735         (WebCore::XSSAuditorDelegate::generateViolationReport):
736         (WebCore::XSSAuditorDelegate::didBlockScript):
737         * html/parser/XSSAuditorDelegate.h:
738         (WebCore::XSSInfo::XSSInfo):
739
740 2014-03-20  Daniel Bates  <dabates@apple.com>
741
742         XSSAuditor bypass with frameset tags
743
744         Merged from Blink (patch by Tom Sepez):
745         https://src.chromium.org/viewvc/blink?view=rev&revision=157794
746
747         Test: http/tests/security/xssAuditor/frameset-injection.html
748
749         * html/parser/XSSAuditor.cpp:
750         (WebCore::XSSAuditor::filterStartToken):
751         (WebCore::XSSAuditor::filterFrameToken):
752         * html/parser/XSSAuditor.h:
753
754 2014-03-20  Brian Burg  <bburg@apple.com>
755
756         Web Replay: fix some oversights in the replay backend
757         https://bugs.webkit.org/show_bug.cgi?id=130435
758
759         Reviewed by Andreas Kling.
760
761         This functionality will be covered by tests in https://webkit.org/b/130145.
762
763         * inspector/InspectorInstrumentation.cpp:
764         (WebCore::InspectorInstrumentation::playbackFinishedImpl):
765         * inspector/InspectorInstrumentation.h:
766         (WebCore::InspectorInstrumentation::playbackFinished):
767         * inspector/InspectorReplayAgent.cpp:
768         (WebCore::buildInspectorObjectForSegment):
769         (WebCore::InspectorReplayAgent::playbackFinished):
770         * inspector/InspectorReplayAgent.h: Add a playbackFinished event to Inspector
771         instrumentation. This is fired by ReplayController when playback is cancelled or 
772         playback of the final segment has completed.
773
774         * replay/EventLoopInputDispatcher.cpp:
775         (WebCore::EventLoopInputDispatcher::dispatchInputSoon): Fix wrong cast.
776         (WebCore::EventLoopInputDispatcher::dispatchInput): Ensure that m_dispatching is
777         false when m_running is false.
778         * replay/EventLoopInputDispatcher.h: Distinguish 'dispaching' and 'running' in comments.
779         (WebCore::EventLoopInputDispatcher::isRunning): Added.
780
781         * replay/FunctorInputCursor.h: Since the base class InputCursor is RefCounted, the
782         Functor subclass cannot be put into a unique_ptr. Add create() method instead.
783
784         * replay/ReplayController.cpp:
785         (WebCore::ReplayController::loadSegmentAtIndex): Renamed from loadSegment(). Callers
786         now pass in the desired segment index rather than the segment itself. The index is
787         necessary to properly reset m_position after the segment is loaded.
788
789         (WebCore::ReplayController::startPlayback): Set the dispatcher's speed before run().
790         (WebCore::ReplayController::pausePlayback): Only pause the dispatcher if it's running.
791         (WebCore::ReplayController::cancelPlayback): Add playbackFinished instrumentation.
792         (WebCore::ReplayController::replayToPosition):
793         (WebCore::ReplayController::didDispatchFinalInput): If there are no more segments to load,
794         manually adjust the final m_position and defer to cancelPlayback to unload the segment.
795         * replay/ReplayController.h:
796         * replay/ReplaySessionSegment.cpp:
797         (WebCore::ReplaySessionSegment::createFunctorCursor):
798         * replay/ReplaySessionSegment.h:
799
800 2014-03-20  Pratik Solanki  <psolanki@apple.com>
801
802         [iOS] Get code to compile on older iOS versions
803         https://bugs.webkit.org/show_bug.cgi?id=130142
804         <rdar://problem/16302908>
805
806         Reviewed by Darin Adler.
807
808         * WebCore.exp.in:
809         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
810         (-[WebVideoFullscreenController WebCore::]):
811         (-[WebVideoFullscreenController enterFullscreen:]):
812         (-[WebVideoFullscreenController exitFullscreen]):
813         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
814         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
815         * platform/mac/HTMLConverter.mm:
816         (_dateForString):
817         * platform/network/cf/CookieJarCFNet.cpp:
818         (WebCore::copyCookiesForURLWithFirstPartyURL):
819         * platform/text/ios/LocalizedDateCache.mm:
820         (WebCore::LocalizedDateCache::calculateMaximumWidth):
821         * platform/text/mac/LocaleMac.mm:
822         (WebCore::LocaleMac::LocaleMac):
823
824 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
825
826         Followup build fix: AnimationBase.h needs to be private because
827         it's included by AnimationController.h.
828
829         * WebCore.xcodeproj/project.pbxproj:
830
831 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
832
833         A completed fill-forwards animation should not disable overlap testing
834         https://bugs.webkit.org/show_bug.cgi?id=130522
835         <rdar://problem/15862395>
836
837         Reviewed by Dean Jackson.
838         
839         Previously, if -webkit-transform was being keyframe-animated, and the
840         animation had fill-forwards, then we would continue to think that the
841         animation is running and turn off compositing overlap testing. This
842         caused some sites to keep too much backing store around.
843         
844         Fix by having isRunning{Accelerated}AnimationOnRenderer take some flags
845         so that more specific questions about the running state can be asked.
846         For layer creation, keep using the same criteria as before (for now)
847         which includes paused and fill-forwards animations. For overlap testing,
848         don't include the fill-forwards test.
849
850         Tests: compositing/animation/filling-animation-overlap-at-end.html
851                compositing/animation/filling-animation-overlap.html
852                compositing/animation/layer-for-filling-animation.html
853
854         * page/animation/AnimationBase.h:
855         (WebCore::AnimationBase::fillingForwards):
856         (WebCore::AnimationBase::inPausedState):
857         (WebCore::AnimationBase::isAnimatingProperty):
858         * page/animation/AnimationController.cpp:
859         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
860         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
861         (WebCore::AnimationController::isRunningAnimationOnRenderer):
862         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
863         * page/animation/AnimationController.h:
864         * page/animation/AnimationControllerPrivate.h:
865         * page/animation/CompositeAnimation.cpp:
866         (WebCore::CompositeAnimation::isAnimatingProperty):
867         * page/animation/CompositeAnimation.h:
868         * rendering/RenderLayerBacking.cpp:
869         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
870         * rendering/RenderLayerCompositor.cpp:
871         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
872         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
873
874 2014-03-20  Dirk Schulze  <krit@webkit.org>
875
876         Canvas methods clip/fill/stroke should not except 0 argument
877         https://bugs.webkit.org/show_bug.cgi?id=130497
878
879         Reviewed by Dean Jackson.
880
881         Do not allow nullable argument for fill/stroke/clip.
882
883         No new tests. Updated existing tests.
884
885         * html/canvas/CanvasRenderingContext2D.idl:
886
887 2014-03-20  Eric Carlson  <eric.carlson@apple.com>
888
889         [iOS] Support MediaDocument when building with PLUGIN_PROXY_FOR_VIDEO
890         https://bugs.webkit.org/show_bug.cgi?id=130520
891
892         Reviewed by Jer Noble.
893
894         * dom/DOMImplementation.cpp:
895         (WebCore::DOMImplementation::createDocument): Check the isVideoPluginProxyEnabled setting 
896             when building with ENABLE_PLUGIN_PROXY_FOR_VIDEO.
897
898 2014-03-20  Mihai Tica  <mitica@adobe.com>
899
900         [CSS Blending] Blending operation is not isolated when setting z-index on parent from javascript
901         https://bugs.webkit.org/show_bug.cgi?id=129307
902
903         Reviewed by Dean Jackson.
904
905         Reimplement the logic behind isolating blend modes. The blending operation should be limited to the
906         contents of the parent stacking context. The proposed solution implies adding logic in updateDescendantDependentFlags,
907         to track child elements that have blending and create a transparency layer that triggers isolation.
908
909         Tests: css3/compositing/blend-mode-background.html
910                fast/repaint/blend-mode-isolate-stacking-context.html
911
912         * rendering/RenderLayer.cpp:
913         (WebCore::RenderLayer::RenderLayer): Remove old members, add new members to constructor.
914         (WebCore::RenderLayer::updateBlendMode): Update parent stacking context isolation on blend mode change.
915         (WebCore::RenderLayer::updateNonCompositedParentStackingContextHasBlendedChild):
916         - Set m_hasBlendedElementInChildStackingContext for the non composited parent stacking context.
917         (WebCore::RenderLayer::dirtyAncestorParentStackingContextHasBlendedElement):
918         - Set flag so isolation should be considered in updateDescendantDependentFlags.
919         (WebCore::RenderLayer::nonCompositedParentStackingContextHasBlendedChild):
920         - Return whether the non composited parent stacking context isolates blending.
921         (WebCore::RenderLayer::updateDescendantDependentFlags): Add logic for isolating blending.
922         (WebCore::RenderLayer::addChild): Call to updateNonCompositedParentStackingContextHasBlendedChild if needed.
923         (WebCore::RenderLayer::removeChild): Call to dirtyAncestorParentStackingContextHasBlendedElement if needed.
924         (WebCore::RenderLayer::updateStackingContextsAfterStyleChange): Update isolation when a stacking context was set or unset.
925         (WebCore::RenderLayer::styleChanged): Removed oldStyle parameter from updateBlendMode call.
926          Update parent stacking context isolation on blend mode change.
927         * rendering/RenderLayer.h:
928         - Add members, getters and setters for tracking whether the element has a blended child:
929             - m_hasBlendedElementInChildStackingContext
930             - m_hasBlendedElementInChildStackingContextStatusDirty
931         - Removed m_updateParentStackingContextShouldIsolateBlendingDirty (replaced with m_hasBlendedElementInChildStackingContextStatusDirty)
932         - Removed m_isolatesBlending (replaced with m_hasBlendedElementInChildStackingContext)
933         - Updated the isolatesBlending method to return true only when the element is a stacking context and has a blended child.
934         * rendering/RenderLayerCompositor.cpp:
935         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Removed layer.updateParentStackingContextShouldIsolateBlending call.
936
937 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
938
939         [GTK] [CMake] Do not compile ProxyResolverSoup.cpp
940         https://bugs.webkit.org/show_bug.cgi?id=130516
941
942         Reviewed by Sergio Villar Senin.
943
944         * PlatformGTK.cmake: Remove the file from the source list.
945
946 2014-03-20  Commit Queue  <commit-queue@webkit.org>
947
948         Unreviewed, rolling out r165962.
949         https://bugs.webkit.org/show_bug.cgi?id=130512
950
951         It broke the build (Requested by Ossy on #webkit).
952
953         Reverted changeset:
954
955         "[EFL][GTK] Get CMake to find Freetype2 properly"
956         https://bugs.webkit.org/show_bug.cgi?id=130150
957         http://trac.webkit.org/changeset/165962
958
959 2014-03-20  Lorenzo Tilve  <ltilve@igalia.com>
960
961         "input" event is not fired when changing a select element's value
962         https://bugs.webkit.org/show_bug.cgi?id=117526
963
964         Reviewed by Antti Koivisto.
965
966         Add a call to dispatch input event when listbox or menulist
967         values are modified.
968
969         According to the spec: "When the user agent is to send select update
970         notifications, queue a task to first fire a simple even that bubbles
971         named input at the select element, and then fire a simple event that
972         bubbles named change at the select element, using the user interaction
973         task source as the task source."
974
975         Tests: fast/forms/select/listbox-oninput-fired.html
976                fast/forms/select/menulist-oninput-fired.html
977
978         * html/HTMLSelectElement.cpp:
979         (WebCore::HTMLSelectElement::listBoxOnChange):
980         (WebCore::HTMLSelectElement::dispatchChangeEventForMenuList):
981
982 2014-03-20  Radu Stavila  <stavila@adobe.com>
983
984         [CSS Regions] The height of a scrollable element flowed inside a scrollable region is not computed correctly
985         https://bugs.webkit.org/show_bug.cgi?id=129487
986
987         Reviewed by Andrei Bucur.
988
989         When propagating the layout overflow from the flowed element up to the flow thread itself,
990         the region's logical bottom padding and the element's logical bottom margin must be taken into consideration.
991         However, if the flowed element has overflow, the overflow will be painted over the region's padding
992         and the element's margin, in order to be compatible with the non-regions case.
993         More info can be found here: http://lists.w3.org/Archives/Public/www-style/2014Jan/0089.html
994
995         Tests: fast/regions/scrollable-region-content-size-horiz-bt.html
996                fast/regions/scrollable-region-content-size-no-overflow-horiz-bt.html
997                fast/regions/scrollable-region-content-size-no-overflow-vert-rl.html
998                fast/regions/scrollable-region-content-size-no-overflow.html
999                fast/regions/scrollable-region-content-size-relative.html
1000                fast/regions/scrollable-region-content-size-vert-rl.html
1001                fast/regions/scrollable-region-content-size-vertical-lr.html
1002                fast/regions/scrollable-region-content-size.html
1003                fast/regions/scrollable-region-scrollable-content.html
1004
1005         * rendering/RenderFlowThread.cpp:
1006         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1007         * rendering/RenderRegion.cpp:
1008         (WebCore::RenderRegion::rectFlowPortionForBox):
1009
1010 2014-03-20  Zalan Bujtas  <zalan@apple.com>
1011
1012         Subpixel rendering: Nested layers with subpixel accumulation paint to wrong position.
1013         https://bugs.webkit.org/show_bug.cgi?id=130153
1014
1015         Reviewed by Simon Fraser.
1016
1017         Subpixels (fractional device pixels here) can accumulate through nested layers. Subpixels
1018         need to be propagated through the layer tree so that painting coordinates match layout coordinates.
1019
1020         Subpixel accumulation through nesting (absolute positioning, 2x display):
1021         non-compositing case:
1022         (nested boxes)  (layout pos) (norm.paint pos) (translate accumulation, subpixel accumulation, final paint pos)
1023         div -> top: 1.3px   1.3px     1.5px      1.5px 0.2px -> snapped 0.0px -> 1.5px
1024          div -> top: 1.3px   2.6px     2.5px      3.0px 0.4px -> snapped 0.5px -> 2.5px
1025           div -> top: 1.3px   3.9px     4.0px      4.5px 0.6px -> snapped 0.5px -> 4.0px
1026            div -> top: 1.3px   5.2px     5.0px      6.0px 0.8px -> snapped 1.0px -> 5.0px
1027
1028         compositing case:
1029         (nested boxes)  (layout pos) (norm.paint pos) (device pixel offset + fractional offset, final pos)
1030         div -> top: 1.3px   1.3px      1.5px      1.0px + 0.3px -> snapped -> 1.5px
1031          div -> top: 1.3px   2.6px      2.5px      2.5px + 0.1px -> snapped -> 2.5px
1032           div -> top: 1.3px   3.9px      4.0px      3.5px + 0.4px -> snapped -> 4.0px
1033            div -> top: 1.3px   5.2px      5.0px      5.0px + 0.2px -> snapped -> 5.0px
1034
1035         Tests: compositing/hidpi-nested-compositing-layers-with-subpixel-accumulation.html
1036                fast/layers/hidpi-nested-layers-with-subpixel-accumulation.html
1037
1038         * rendering/RenderLayer.cpp:
1039         (WebCore::RenderLayer::paintLayerByApplyingTransform):
1040         * rendering/RenderLayerBacking.cpp:
1041         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1042         * rendering/RenderLayerBacking.h:
1043         (WebCore::RenderLayerBacking::devicePixelFractionFromRenderer):
1044
1045 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1046
1047         [EFL][GTK] Get CMake to find Freetype2 properly
1048         https://bugs.webkit.org/show_bug.cgi?id=130150
1049
1050         Reviewed by Csaba Osztrogonác.
1051
1052         Newer versions of CMake are not able to find Freetype2 correctly.
1053         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
1054         freetype2 repo, because a completely different version number is found in freetype2.pc.
1055
1056         * PlatformEfl.cmake:
1057         * PlatformGTK.cmake:
1058
1059 2014-03-20  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
1060
1061         Refactor checking log channel state in MediaPlayerPrivateGStreamerBase.
1062         https://bugs.webkit.org/show_bug.cgi?id=130241
1063
1064         Reviewed by Philippe Normand.
1065
1066         The channel was passed around only to check its state. Cleaned this up
1067         by adding a method to check whether a log channel is enabled.
1068
1069         * platform/Logging.cpp:
1070         (WebCore::isLogChannelEnabled):
1071         * platform/Logging.h:
1072         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1073         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
1074
1075 2014-03-20  Lorenzo Tilve  <ltilve@igalia.com>
1076
1077         Dispatch input event for Range element keyboard event
1078         https://bugs.webkit.org/show_bug.cgi?id=129929
1079
1080         Reviewed by Kent Tamura.
1081
1082         For any value update, dispatch both input and change event.
1083         Also removes extra dispatch change event, as event is dispatched
1084         from TextFieldInputType:setValue.
1085
1086         Merged from Blink (patch by Habib Virji):
1087         https://src.chromium.org/viewvc/blink?revision=168558&view=revision
1088
1089         Test: fast/forms/range/range-keyboard-oninput-event.html
1090
1091         * html/RangeInputType.cpp:
1092         (WebCore::RangeInputType::handleKeydownEvent):
1093
1094 2014-03-20  Jinwoo Song  <jinwoo7.song@samsung.com>
1095
1096         Refine BatteryStatus module
1097         https://bugs.webkit.org/show_bug.cgi?id=130495
1098
1099         Reviewed by Andreas Kling.
1100
1101         Small refinements:
1102          - Return PassRef instead of PassRefPtr in create method
1103          - Switched to nullptr instead of 0 where appropriate.
1104          - Removed unused function and header file.
1105          - Removed unnecessary empty lines.
1106
1107         * Modules/battery/BatteryController.h:
1108         * Modules/battery/BatteryManager.cpp:
1109         (WebCore::BatteryManager::create): Make return passRef.
1110         * Modules/battery/BatteryManager.h:
1111         (WebCore::BatteryManager::batteryControllerDestroyed): Use nullptr.
1112         * Modules/battery/BatteryStatus.cpp:
1113         (WebCore::BatteryStatus::create): Make return passRef.
1114         * Modules/battery/BatteryStatus.h:
1115         * Modules/battery/NavigatorBattery.cpp:
1116         (WebCore::NavigatorBattery::webkitBattery): Remove batteryManager().
1117         * Modules/battery/NavigatorBattery.h:
1118
1119 2014-03-19  Pratik Solanki  <psolanki@apple.com>
1120
1121         [iOS] Get code to compile on older iOS versions
1122         https://bugs.webkit.org/show_bug.cgi?id=130142
1123         <rdar://problem/16302908>
1124
1125         Reviewed by Darin Adler.
1126
1127         * WebCore.exp.in:
1128         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1129         (-[WebVideoFullscreenController WebCore::]):
1130         (-[WebVideoFullscreenController enterFullscreen:]):
1131         (-[WebVideoFullscreenController exitFullscreen]):
1132         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1133         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1134         * platform/mac/HTMLConverter.mm:
1135         (_dateForString):
1136         * platform/network/cf/CookieJarCFNet.cpp:
1137         (WebCore::copyCookiesForURLWithFirstPartyURL):
1138         * platform/text/ios/LocalizedDateCache.mm:
1139         (WebCore::LocalizedDateCache::calculateMaximumWidth):
1140         * platform/text/mac/LocaleMac.mm:
1141         (WebCore::LocaleMac::LocaleMac):
1142
1143 2014-03-19  Byungseon Shin  <sun.shin@lge.com>
1144
1145         Fix "WEBKIT_WEBGL_compressed_texture_pvrtc" extension support
1146         https://bugs.webkit.org/show_bug.cgi?id=130292
1147
1148         Reviewed by Dean Jackson.
1149
1150         WebGLRenderingContext::getExtension was not returning WEBGL_compressed_texture_pvrtc extension.
1151
1152         * html/canvas/WebGLRenderingContext.cpp:
1153         (WebCore::WebGLRenderingContext::getExtension):
1154
1155 2014-03-19  Brent Fulgham  <bfulgham@apple.com>
1156
1157         Merge Misc. WebVTT Updates from Blink.
1158         https://bugs.webkit.org/show_bug.cgi?id=130491
1159
1160         Reviewed by Eric Carlson.
1161
1162         Test: media/track/track-webvtt-tc030-interspersed-non-cue.html
1163
1164         Merged from Blink (patch by vcarbune@chromium.org):
1165         https://chromium.googlesource.com/chromium/blink/+/fb62b2b54944bd19026192c049a1db250756fc12
1166         http://crbug.com/40323003
1167         https://chromium.googlesource.com/chromium/blink/+/29176fb0b394a97e85f4dabc07e18329f3ceae41
1168         http://crbug.com/54463002
1169         https://chromium.googlesource.com/chromium/blink/+/29476f839a08cb17c5a3fc713f7e454e7cea9c60
1170         http://crbug.com/55853002
1171         https://chromium.googlesource.com/chromium/blink/+/ba2378ef873e786cf2937034e012669cdd37dfe8
1172         http://crbug.com/65343003
1173         https://chromium.googlesource.com/chromium/blink/+/1915b9aa1bba45aebf28531b40ae627ecf9a3d59
1174         http://crbug.com/62833005
1175         https://chromium.googlesource.com/chromium/blink/+/ea46dbd0f1f29779a1cd4f59b19361b803f09a9b
1176         http://crbug.com/64273013
1177         https://chromium.googlesource.com/chromium/blink/+/9eb4bb6b627357bb94d66386a4123ec004cccfc4
1178         http://crbug.com/101513002
1179         https://chromium.googlesource.com/chromium/blink/+/192a843b32eafb77bf92c50ec50d334ba935028a
1180         http://crbug.com/102403002
1181         https://chromium.googlesource.com/chromium/blink/+/15f9efcc952fcf73184e28fb9db79633c1fa6653
1182         http://crbug.com/104443002
1183         https://chromium.googlesource.com/chromium/blink/+/74fd66b451a464683f7cb748855b1740a54b2c16
1184         http://crbug.com/75243004
1185
1186         * html/track/TextTrackRegion.cpp:
1187         (WebCore::TextTrackRegion::parseSettingValue):
1188         * html/track/VTTCue.cpp:
1189         (WebCore::VTTCue::markFutureAndPastNodes):
1190         (WebCore::VTTCue::setCueSettings):
1191         * html/track/WebVTTParser.cpp:
1192         (WebCore::scanDigits):
1193         (WebCore::WebVTTParser::collectDigitsToInt):
1194         (WebCore::WebVTTParser::parseFloatPercentageValue):
1195         (WebCore::WebVTTParser::parseBytes):
1196         (WebCore::WebVTTParser::collectMetadataHeader):
1197         (WebCore::WebVTTParser::collectTimingsAndSettings):
1198         (WebCore::WebVTTParser::createDocumentFragmentFromCueText):
1199         (WebCore::WebVTTParser::createNewCue):
1200         (WebCore::WebVTTParser::createNewRegion):
1201         (WebCore::WebVTTParser::collectTimeStamp):
1202         (WebCore::tokenToNodeType):
1203         (WebCore::WebVTTParser::constructTreeFromToken):
1204         * html/track/WebVTTParser.h:
1205         * html/track/WebVTTToken.h:
1206         (WebCore::WebVTTToken::name):
1207         (WebCore::WebVTTToken::characters):
1208         (WebCore::WebVTTToken::appendToCharacter):
1209         (WebCore::WebVTTToken::addNewClass):
1210         (WebCore::WebVTTToken::classes):
1211         (WebCore::WebVTTToken::addNewAnnotation):
1212         (WebCore::WebVTTToken::annotation):
1213         * html/track/WebVTTTokenizer.cpp:
1214         (WebCore::equalLiteral):
1215         (WebCore::WebVTTTokenizer::WebVTTTokenizer):
1216         (WebCore::WebVTTTokenizer::nextToken):
1217         * html/track/WebVTTTokenizer.h:
1218
1219 2014-03-19  Mark Hahnenberg  <mhahnenberg@apple.com>
1220
1221         GC timer should intelligently choose between EdenCollections and FullCollections
1222         https://bugs.webkit.org/show_bug.cgi?id=128261
1223
1224         Reviewed by Geoffrey Garen.
1225
1226         No new tests.
1227
1228         Updated WebSafeGCActivityCallbacks for both Eden and Full timers.
1229
1230         * bindings/js/JSDOMWindowBase.cpp:
1231         (WebCore::JSDOMWindowBase::commonVM):
1232         * platform/ios/WebSafeGCActivityCallbackIOS.h:
1233
1234 2014-03-19  Andy Estes  <aestes@apple.com>
1235
1236         Fix the iOS build after r165917.
1237
1238         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1239
1240 2014-03-19  Commit Queue  <commit-queue@webkit.org>
1241
1242         Unreviewed, rolling out r165926.
1243         https://bugs.webkit.org/show_bug.cgi?id=130488
1244
1245         broke the iOS build (Requested by estes on #webkit).
1246
1247         Reverted changeset:
1248
1249         "GC timer should intelligently choose between EdenCollections
1250         and FullCollections"
1251         https://bugs.webkit.org/show_bug.cgi?id=128261
1252         http://trac.webkit.org/changeset/165926
1253
1254 2014-03-19  Commit Queue  <commit-queue@webkit.org>
1255
1256         Unreviewed, rolling out r165929.
1257         https://bugs.webkit.org/show_bug.cgi?id=130487
1258
1259         in order to roll out r165926 (Requested by estes on #webkit).
1260
1261         Reverted changeset:
1262
1263         http://trac.webkit.org/changeset/165929
1264
1265 2014-03-19  Mark Hahnenberg  <mhahnenberg@apple.com>
1266
1267         Build fix for iOS after r165926
1268
1269         * bindings/js/JSDOMWindowBase.cpp:
1270         (WebCore::JSDOMWindowBase::commonVM):
1271         * platform/ios/WebSafeGCActivityCallbackIOS.h:
1272
1273 2014-03-19  Eric Carlson  <eric.carlson@apple.com>
1274
1275         Allow media engine to update HTMLMediaElement state when playing to external device
1276         https://bugs.webkit.org/show_bug.cgi?id=130480
1277
1278         Reviewed by Jer Noble.
1279
1280         * html/HTMLMediaElement.h: Add mediaPlayerHandlePlaybackCommand.
1281
1282         * platform/graphics/MediaPlayer.cpp:
1283         (WebCore::MediaPlayer::handlePlaybackCommand): New.
1284         * platform/graphics/MediaPlayer.h:
1285         (WebCore::MediaPlayerClient::mediaPlayerHandlePlaybackCommand):
1286
1287         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1288         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged): Send Play and Pause commands when
1289             playing to an external device.
1290
1291 2014-03-19  Dirk Schulze  <krit@webkit.org>
1292
1293         Implement isPointInPath and isPointInStroke with Path2D argument
1294         https://bugs.webkit.org/show_bug.cgi?id=130473
1295
1296         Reviewed by Dean Jackson.
1297
1298         Implement isPointInPath and isPointInStroke for 2D Canvas contxts
1299         with Path2D argument.
1300
1301
1302         Tests: fast/canvas/canvas-path-isPointInPath.html
1303                fast/canvas/canvas-path-isPointInStroke.html
1304
1305         * html/canvas/CanvasRenderingContext2D.cpp:
1306         (WebCore::CanvasRenderingContext2D::isPointInPath):
1307         (WebCore::CanvasRenderingContext2D::isPointInStroke):
1308         (WebCore::CanvasRenderingContext2D::isPointInPathInternal):
1309         (WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
1310         * html/canvas/CanvasRenderingContext2D.h:
1311         * html/canvas/CanvasRenderingContext2D.idl:
1312
1313 2014-03-13  Mark Hahnenberg  <mhahnenberg@apple.com>
1314
1315         GC timer should intelligently choose between EdenCollections and FullCollections
1316         https://bugs.webkit.org/show_bug.cgi?id=128261
1317
1318         Reviewed by Geoffrey Garen.
1319
1320         No new tests.
1321
1322         * platform/ios/WebSafeGCActivityCallbackIOS.h: Update WebSafeGCActivityCallback
1323         appropriately for the introduction of another type of GCActivityCallback.
1324
1325 <<<<<<< .mine
1326 2014-03-18  Mark Hahnenberg  <mhahnenberg@apple.com>
1327
1328         GC timer should intelligently choose between EdenCollections and FullCollections
1329         https://bugs.webkit.org/show_bug.cgi?id=128261
1330
1331         Reviewed by Geoffrey Garen.
1332
1333         No new tests.
1334
1335         Updated WebSafeGCActivityCallbacks for both Eden and Full timers.
1336
1337         * platform/ios/WebSafeGCActivityCallbackIOS.h:
1338
1339 =======
1340 2014-03-19  Antti Koivisto  <antti@apple.com>
1341
1342         Crash with long selector list
1343         https://bugs.webkit.org/show_bug.cgi?id=123006
1344
1345         Reviewed by Andreas Kling.
1346
1347         Test: fast/css/long-selector-list-crash.html
1348
1349         * css/CSSSelectorList.cpp:
1350         (WebCore::CSSSelectorList::CSSSelectorList):
1351         (WebCore::CSSSelectorList::adoptSelectorVector):
1352         (WebCore::CSSSelectorList::operator=):
1353         * css/StyleRule.cpp:
1354         (WebCore::StyleRule::create):
1355
1356             Add a bunch of asserts.
1357
1358         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
1359         
1360             This could produce a zero-length selector list.
1361
1362 2014-03-19  Andreas Kling  <akling@apple.com>
1363
1364         Rebaseline bindings tests.
1365
1366         * bindings/scripts/test/JS/*:
1367
1368 2014-03-04  Jer Noble  <jer.noble@apple.com>
1369
1370         [iOS][MediaControls] Reverse-pinching using the built-in controls should enter full screen
1371         https://bugs.webkit.org/show_bug.cgi?id=129707
1372
1373         Reviewed by Eric Carlson.
1374
1375         The default controls on iOS should respond to a pinch gesture by entering fullscreen. Add a gesture
1376         event listener, and enter full screen if the user does a quick (>2 velocity) reverse (>1.25 scale) pinch.
1377
1378         * Modules/mediacontrols/mediaControlsiOS.js:
1379         (ControllerIOS.prototype.createBase):
1380         (ControllerIOS.prototype.handlePlayButtonTouchEnd):
1381         (ControllerIOS.prototype.handleBaseGestureStart):
1382         (ControllerIOS.prototype.handleBaseGestureChange):
1383         (ControllerIOS.prototype.handleBaseGestureEnd):
1384
1385 2014-03-19  Ryosuke Niwa  <rniwa@webkit.org>
1386
1387         REGRESSION(r156316): Scrollbar on a large document is broken
1388         https://bugs.webkit.org/show_bug.cgi?id=130474
1389         <rdar://problem/16371523>
1390
1391         Reviewed by Anders Carlsson.
1392
1393         The bug was caused by updateArrowPlacement() doing the work even though Scrollbar Overlay API is available.
1394         Prior to r156316, this function exited early:
1395         http://trac.webkit.org/browser/trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm?rev=156315#L147
1396
1397         Fixed the bug by deleting updateArrowPlacement() entirely.
1398
1399         * platform/mac/ScrollbarThemeMac.mm:
1400         (WebCore::ScrollbarThemeMac::preferencesChanged):
1401
1402 2014-03-19  Jer Noble  <jer.noble@apple.com>
1403
1404         [Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
1405         https://bugs.webkit.org/show_bug.cgi?id=130459
1406
1407         Reviewed by Eric Carlson.
1408
1409         * WebCore.exp.in: Export the new WCSI method.
1410         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1411         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsKeySystem): Bail early if we have no decoder support.
1412         * platform/mac/WebCoreSystemInterface.h: Provide a WCSI wrapper for WKSI.
1413         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1414
1415 2014-03-19  Eric Carlson  <eric.carlson@apple.com>
1416
1417         Make Remote Control commands testable
1418         https://bugs.webkit.org/show_bug.cgi?id=130358
1419
1420         Reviewed by Jer Noble.
1421
1422         Test: media/video-remote-control-playpause.html
1423
1424         * html/HTMLMediaElement.cpp:
1425         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Call session->clientWillPausePlayback.
1426         (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): Log the command.
1427
1428         * platform/audio/MediaSession.cpp:
1429         (WebCore::MediaSessionClient::mediaSessionTitle): Move from header file.
1430         (WebCore::MediaSessionClient::mediaSessionDuration): Ditto.
1431         (WebCore::MediaSessionClient::mediaSessionCurrentTime): Ditto.
1432         * platform/audio/MediaSession.h:
1433
1434         * platform/audio/MediaSessionManager.cpp:
1435         (WebCore::MediaSessionManager::MediaSessionManager): Get rid of m_activeSession.
1436         (WebCore::MediaSessionManager::removeSession): No need to clear m_activeSession because 
1437             we use the m_sessions vector.
1438         (WebCore::MediaSessionManager::sessionWillBeginPlayback): setCurrentSession takes a 
1439             MediaSession&.
1440         (WebCore::MediaSessionManager::sessionWillEndPlayback): Keep m_sessions sorted so playing
1441             sessions are before paused sessions.
1442         (WebCore::MediaSessionManager::setCurrentSession): Move the session that is beginning to
1443             play to the head of m_sessions.
1444         (WebCore::MediaSessionManager::currentSession): Return m_sessions[0] or nullptr.
1445         (WebCore::MediaSessionManager::didReceiveRemoteControlCommand):
1446         * platform/audio/MediaSessionManager.h:
1447
1448         * platform/audio/ios/MediaSessionManagerIOS.mm: Include MediaPlayer.h.
1449
1450         * testing/Internals.cpp:
1451         (WebCore::Internals::postRemoteControlCommand): New.
1452         * testing/Internals.h:
1453         * testing/Internals.idl:
1454
1455 2014-03-19  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1456
1457         Improving webkitGetUserMedia error handling and error messages
1458         https://bugs.webkit.org/show_bug.cgi?id=130452
1459
1460         Reviewed by Eric Carlson.
1461
1462         Checking if first argument of webkitGetUserMedia is a valid Dictionary. If not, throw an exception with a
1463         clearer message of the error.
1464
1465         Test updated.
1466
1467         * Modules/mediastream/NavigatorMediaStream.idl:
1468         * UseJSC.cmake:
1469         * bindings/js/JSNavigatorCustom.cpp: Added.
1470
1471 2014-03-19  Andreas Kling  <akling@apple.com>
1472
1473         JSC bindings should use the passed-in global object for wrapper caching.
1474         <https://webkit.org/b/130458>
1475
1476         Take a shorter path to the DOMWrapperWorld by using the passed-in
1477         global object instead of getting the lexical global from ExecState.
1478         Removed an old FIXME that no longer applies since JSObjects can
1479         always find the right global object these days.
1480
1481         Reviewed by Geoff Garen.
1482
1483         * bindings/js/JSCSSRuleCustom.cpp:
1484         (WebCore::toJS):
1485         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1486         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
1487         * bindings/js/JSCSSValueCustom.cpp:
1488         (WebCore::toJS):
1489         * bindings/js/JSDOMBinding.h:
1490         (WebCore::createWrapper):
1491         (WebCore::wrap):
1492         (WebCore::getExistingWrapper):
1493         (WebCore::createNewWrapper):
1494         (WebCore::toJS):
1495         * bindings/js/JSDOMWindowCustom.cpp:
1496         (WebCore::JSDOMWindow::setTimeout):
1497         (WebCore::JSDOMWindow::setInterval):
1498         (WebCore::JSDOMWindow::addEventListener):
1499         (WebCore::JSDOMWindow::removeEventListener):
1500         * bindings/js/JSDocumentCustom.cpp:
1501         (WebCore::JSDocument::location):
1502         (WebCore::toJS):
1503         * bindings/js/JSElementCustom.cpp:
1504         (WebCore::toJSNewlyCreated):
1505         * bindings/js/JSEventCustom.cpp:
1506         (WebCore::toJS):
1507         * bindings/js/JSHTMLCollectionCustom.cpp:
1508         (WebCore::toJS):
1509         * bindings/js/JSHTMLTemplateElementCustom.cpp:
1510         (WebCore::JSHTMLTemplateElement::content):
1511         * bindings/js/JSImageDataCustom.cpp:
1512         (WebCore::toJS):
1513         * bindings/js/JSNodeCustom.cpp:
1514         (WebCore::createWrapperInline):
1515         * bindings/js/JSNodeCustom.h:
1516         (WebCore::toJS):
1517         * bindings/js/JSSVGPathSegCustom.cpp:
1518         (WebCore::toJS):
1519         * bindings/js/JSStyleSheetCustom.cpp:
1520         (WebCore::toJS):
1521         * bindings/js/JSTextTrackCueCustom.cpp:
1522         (WebCore::toJS):
1523         * bindings/js/JSTrackCustom.cpp:
1524         (WebCore::toJS):
1525         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1526         (WebCore::JSWorkerGlobalScope::setTimeout):
1527         (WebCore::JSWorkerGlobalScope::setInterval):
1528         * bindings/scripts/CodeGeneratorJS.pm:
1529         (GenerateImplementation):
1530
1531 2014-03-19  Benjamin Poulain  <bpoulain@apple.com>
1532
1533         Page::setPageScaleFactor should not force the scroll view position when using delegatesScrolling()
1534         https://bugs.webkit.org/show_bug.cgi?id=130429
1535
1536         Reviewed by Simon Fraser.
1537
1538         When setting the same scale mutliple time (for example on load), Page was asking the top scrollview
1539         to scroll to the origin. This is bogus since the scroll view is driving Page::setDeviceScaleFactor,
1540         not the other way around.
1541
1542         Simon fixed the general case in http://trac.webkit.org/changeset/165652/trunk/Source/WebCore/page/Page.cpp
1543         but this branch was still scrolling content.
1544
1545         * page/Page.cpp:
1546         (WebCore::Page::setPageScaleFactor):
1547
1548 2014-03-19  Brady Eidson  <beidson@apple.com>
1549
1550         Filter out editable services from image menu for non-contenteditable images
1551         <rdar://problem/16319645> and https://bugs.webkit.org/show_bug.cgi?id=130437
1552
1553         Reviewed by Tim Horton.
1554
1555         * WebCore.exp.in:
1556
1557 2014-03-19  Dirk Schulze  <krit@webkit.org>
1558
1559         Implement method addPath for Path2D
1560         https://bugs.webkit.org/show_bug.cgi?id=130461
1561
1562         Reviewed by Dean Jackson.
1563
1564         Add support for the Path2D method addPath. The method allows
1565         to append and existing Path2D object to another one. It can be
1566         combined with a transformation matrix SVGMatrix.
1567
1568         Test: fast/canvas/canvas-path-addPath.html
1569
1570         * html/canvas/DOMPath.h: Add new method addPath().
1571         (WebCore::DOMPath::addPath):
1572         * html/canvas/DOMPath.idl:
1573         * platform/graphics/Path.h: Add support for appending paths.
1574         * platform/graphics/cairo/PathCairo.cpp:
1575         (WebCore::Path::addPath):
1576         * platform/graphics/cg/PathCG.cpp:
1577         (WebCore::Path::addPath):
1578         * platform/graphics/wince/PathWinCE.cpp:
1579         (WebCore::Path::addPath):
1580
1581 2014-03-19  Yongjun Zhang  <yongjun_zhang@apple.com>
1582
1583         [iOS] WebKit2 Quicklook.
1584         https://bugs.webkit.org/show_bug.cgi?id=130360
1585
1586         Reviewed by Tim Horton.
1587
1588         Since ResourceLoaders using WebKit2 network process don't have ResourceHandle any more, we
1589         need to make it possible to create QuickLookHandle from ResourceLoader.
1590
1591         * WebCore.exp.in: Make some QuickLookHandle methods visible from WebKit2.
1592         * loader/ResourceLoader.h: Add m_quickLookHandle data member to ResourceLoader.
1593         (WebCore::ResourceLoader::quickLookHandle):
1594         (WebCore::ResourceLoader::setQuickLookHandle):
1595         * platform/network/ios/QuickLook.h: Add a new method to create QuickLookHandle from ResourceLoader.
1596         * platform/network/ios/QuickLook.mm:
1597         (WebCore::QuickLookHandle::create):
1598
1599 2014-03-19  Brent Fulgham  <bfulgham@apple.com>
1600
1601         Fix cue rendering test and include support for left/right alignment
1602         https://bugs.webkit.org/show_bug.cgi?id=130406
1603
1604         Reviewed by Eric Carlson.
1605
1606         Merged from Blink (patch by vcarbune@chromium.org):
1607         https://chromium.googlesource.com/chromium/blink/+/e695703cb603421c741e59a557a7989113c13b94
1608         http://crbug.com/25155003
1609
1610         No new tests. Covered by media/track/track-cue-rendering-snap-to-lines-not-set.html.
1611
1612         * html/track/VTTCue.cpp:
1613         (WebCore::leftKeyword): Added.
1614         (WebCore::rightKeyword): Added.
1615         (WebCore::VTTCueBox::applyCSSProperties): Added.
1616         (WebCore::VTTCue::VTTCue):
1617         (WebCore::VTTCue::align): Handle left/right alignment.
1618         (WebCore::VTTCue::setAlign): Ditto.
1619         (WebCore::VTTCue::calculateDisplayParameters): Refactored and revised for left/right tokens.
1620         (WebCore::VTTCue::setCueSettings): Ditto.
1621         (WebCore::VTTCue::getCSSAlignment): Added.
1622         (WebCore::VTTCue::getCSSWritingMode): Added.
1623         * html/track/VTTCue.h:
1624
1625 2014-03-18  Anders Carlsson  <andersca@apple.com>
1626
1627         Add new functionality that will be required by the history item decoding
1628         https://bugs.webkit.org/show_bug.cgi?id=130433
1629
1630         Reviewed by Sam Weinig.
1631
1632         * platform/KeyedCoding.h:
1633         (WebCore::KeyedDecoder::decodeConditionalObject):
1634
1635 2014-03-19  Tim Horton  <timothy_horton@apple.com>
1636
1637         Fix the iOS build.
1638
1639         * html/BaseDateAndTimeInputType.cpp:
1640         (WebCore::BaseDateAndTimeInputType::parseToDateComponents):
1641         Missing a StringView().
1642
1643 2014-03-19  Antti Koivisto  <antti@apple.com>
1644
1645         Tighten ElementRuleCollector::m_matchedRuleList typing
1646         https://bugs.webkit.org/show_bug.cgi?id=130446
1647
1648         Reviewed by Anders Carlsson.
1649
1650         StyleRuleBase -> StyleRule.
1651
1652         * css/ElementRuleCollector.cpp:
1653         (WebCore::ElementRuleCollector::matchedRuleList):
1654         * css/ElementRuleCollector.h:
1655         * css/StyleResolver.cpp:
1656         (WebCore::StyleResolver::styleRulesForElement):
1657         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1658         * css/StyleResolver.h:
1659         * editing/EditingStyle.cpp:
1660         (WebCore::styleFromMatchedRulesForElement):
1661         * inspector/InspectorCSSAgent.cpp:
1662         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1663         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1664         * inspector/InspectorCSSAgent.h:
1665         * page/DOMWindow.cpp:
1666         (WebCore::DOMWindow::getMatchedCSSRules):
1667
1668 2014-03-19  Mihnea Ovidenie  <mihnea@adobe.com>
1669
1670         [CSSRegions] An unsplittable box is always displayed in a single region
1671         https://bugs.webkit.org/show_bug.cgi?id=130451
1672
1673         Reviewed by Andrei Bucur.
1674
1675         Add an ASSERT stating that an unsplittable box region range always contains 1 region.
1676         No new functionality, no new tests.
1677
1678         * rendering/RenderFlowThread.cpp:
1679         (WebCore::RenderFlowThread::getRegionRangeForBox):
1680
1681 2014-03-19  Zalan Bujtas  <zalan@apple.com>
1682
1683         Subpixel rendering: Transform origin is miscalculated when RenderLayer's
1684         offsetfromRenderer has device pixel fraction value.
1685         https://bugs.webkit.org/show_bug.cgi?id=129859
1686
1687         Reviewed by Simon Fraser.
1688
1689         We need to calculate the transformed origin using the painting coordinates to produce
1690         pixel precise result.
1691
1692         * rendering/RenderLayerBacking.cpp:
1693         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1694         (WebCore::RenderLayerBacking::computeTransformOriginForPainting):
1695         * rendering/RenderLayerBacking.h:
1696
1697 2014-03-19  Claudio Saavedra  <csaavedra@igalia.com>
1698
1699         [GStreamer] Clean timeout source ids
1700         https://bugs.webkit.org/show_bug.cgi?id=130450
1701
1702         Reviewed by Philippe Normand.
1703
1704         Sources IDs need to be cleaned up if the callback removes the
1705         source, otherwise we'll be attempting to remove an empty source at
1706         some point.
1707
1708         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
1709         (webKitMediaVideoSrcStart): Clean the source id.
1710         (webKitMediaAudioSrcStart): Ditto.
1711         (webKitMediaVideoSrcSeekMainCb): Ditto.
1712         (webKitMediaAudioSrcSeekMainCb): Ditto.
1713
1714 2014-03-19  Mihnea Ovidenie  <mihnea@adobe.com>
1715
1716         [CSSRegions] Compute region ranges for children of inline blocks
1717         https://bugs.webkit.org/show_bug.cgi?id=130392
1718
1719         Reviewed by Andrei Bucur.
1720
1721         Extend the region ranges computation for children of inline blocks.
1722         When we cannot retrieve the region range for a box using cached information,
1723         either from region range map or from the region cached on the RootInlineBox,
1724         try to find the top most unsplittable box up to the flow thread boundary.
1725         If we find such unsplittable box and the box has a region range, then return
1726         this range.
1727
1728         Before this patch, method getRegionRangeForBox did not return true/false
1729         if it was able to retrieve the range and the caller checked the returned
1730         region values. I modified the method to return true if we were able to compute
1731         the range.
1732
1733         Tests: fast/regions/inline-block-inline-children-flowed-in-regions.html
1734                fast/regions/inline-blocks-dyn-enlarged-regions.html
1735                fast/regions/inline-blocks-dyn-shrunk-regions.html
1736                fast/regions/inline-blocks-in-two-regions.html
1737
1738         * inspector/InspectorOverlay.cpp:
1739         (WebCore::buildObjectForRendererFragments):
1740         * rendering/RenderBlock.cpp:
1741         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
1742         * rendering/RenderBlockFlow.cpp:
1743         (WebCore::RenderBlockFlow::hasNextPage):
1744         * rendering/RenderBox.cpp:
1745         (WebCore::RenderBox::clampToStartAndEndRegions):
1746         (WebCore::RenderBox::borderBoxRectInRegion):
1747         (WebCore::RenderBox::computeRectForRepaint):
1748         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1749         * rendering/RenderBoxModelObject.cpp:
1750         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
1751         * rendering/RenderFlowThread.cpp:
1752         (WebCore::RenderFlowThread::regionForCompositedLayer):
1753         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1754         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
1755         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
1756         (WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo):
1757         (WebCore::RenderFlowThread::getRegionRangeForBox):
1758         (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
1759         (WebCore::RenderFlowThread::objectInFlowRegion):
1760         (WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
1761         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
1762         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1763         (WebCore::RenderFlowThread::addRegionsLayoutOverflow):
1764         (WebCore::RenderFlowThread::addRegionsVisualOverflow):
1765         (WebCore::RenderFlowThread::clearRegionsOverflow):
1766         * rendering/RenderFlowThread.h:
1767         * rendering/RenderNamedFlowThread.cpp:
1768         (WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
1769         * rendering/RenderObject.cpp:
1770         (WebCore::RenderObject::locateFlowThreadContainingBlock):
1771         Make sure we return the right render flow thread in the case of
1772         region-based multicolumn inside named flows.
1773         * rendering/RenderRegion.cpp:
1774         (WebCore::RenderRegion::rectFlowPortionForBox):
1775
1776 2014-03-19  Krzysztof Wolanski  <k.wolanski@samsung.com>
1777
1778         [EFL] vibration/cancelVibration-during-pattern-vibrating.html is failing after r165598
1779         https://bugs.webkit.org/show_bug.cgi?id=130333
1780
1781         Reviewed by Gyuyoung Kim.
1782
1783         Added setting m_state when calling Vibration::vibrate. It was missing after
1784         refactoring Vibration (r165598).
1785
1786         * Modules/vibration/Vibration.cpp:
1787         (WebCore::Vibration::vibrate):
1788
1789 2014-03-19  Sam Weinig  <sam@webkit.org>
1790
1791         Rewrite WebHTMLConverter::_colorForNode in C++
1792         https://bugs.webkit.org/show_bug.cgi?id=130443
1793
1794         Reviewed by Andreas Kling.
1795
1796         * platform/mac/HTMLConverter.mm:
1797         (_platformColor):
1798         Rename from _colorForRGBColor and simplify to just do the platform conversion.
1799
1800         (normalizedColor):
1801         Extract normalization out of _colorForRGBColor and remove cases that are impossible to hit
1802         due to us only ever using the device color space.
1803
1804         (HTMLConverterCaches::colorPropertyValueForNode):
1805         (-[WebHTMLConverter _colorForNode:property:]):
1806         Convert to C++.
1807
1808         (-[WebHTMLConverter dealloc]):
1809         (-[WebHTMLConverter init]):
1810         Remove caches, we already cache in ColorMac.
1811
1812 2014-03-18  Andrei Bucur  <abucur@adobe.com>
1813
1814         [CSS Regions] Strange layout for content with region breaks
1815         https://bugs.webkit.org/show_bug.cgi?id=121318
1816
1817         Reviewed by Mihnea Ovidenie.
1818
1819         When break-inside: avoid is used on an element, the implementation tries to
1820         force it inside a single fragmentation container even though the descendants
1821         of the element specify forced breaks. This leads to unexpected results and
1822         unstable layout.
1823
1824         The change extends the definition of unsplittable elements for flow threads
1825         using the same conditions found inside RenderBlockFlow::adjustForUnsplittableChild.
1826         This change forces elements that require break avoidance to have a single region
1827         in the region range. As a result, forced breaks have no effect inside them.
1828
1829         It should be noted this may not the behavior defined by the CSS3 Fragmentation spec.
1830         From my understanding of the text, forced breaks override any avoidance specified
1831         by ancestor elements. However, implementing this is a larger change that will require
1832         a fundamental new approach in handling break avoidance. This patch just brings
1833         consistency to the API.
1834
1835         Test: fast/regions/forced-break-inside-avoid-break.html
1836
1837         * rendering/RenderBlock.cpp:
1838         (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation):
1839         (WebCore::RenderBlock::computeRegionRangeForBoxChild):
1840         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
1841         * rendering/RenderBlock.h:
1842         * rendering/RenderBlockFlow.cpp:
1843         (WebCore::RenderBlockFlow::adjustForUnsplittableChild): Move the avoidance conditions inside
1844         a helper method RenderBlock::childBoxIsUnsplittableForFragmentation.
1845
1846 2014-03-18  Samuel White  <samuel_white@apple.com>
1847
1848         AX: Not able to use arrow keys to read text with VoiceOver before selection is set someplace (anyplace).
1849         https://bugs.webkit.org/show_bug.cgi?id=130250
1850
1851         Reviewed by Chris Fleizach.
1852
1853         If initial selection isn't set when we handle selection movement for accessibility, we need to set it. If we don't, using arrow
1854         keys to read text with VoiceOver doesn't work as expected. Things will only start working after the user holds shift and arrows
1855         around to select any arbitrary thing to force selection to get set. This logic handles that special case more gracefully.
1856
1857         Test: platform/mac/accessibility/selection-initial.html
1858
1859         * page/EventHandler.cpp:
1860         (WebCore::handleKeyboardSelectionMovement):
1861         (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
1862         * testing/Internals.cpp:
1863         (WebCore::Internals::resetToConsistentState):
1864
1865 2014-03-18  Brent Fulgham  <bfulgham@apple.com>
1866
1867         TextTrackRegion Not Implemented
1868         https://bugs.webkit.org/show_bug.cgi?id=116546
1869
1870         Reviewed by Eric Carlson.
1871
1872         Merged from Blink (patch by vcarbune@chromium.org):
1873         https://chromium.googlesource.com/chromium/blink/+/4940f89a087fea5b5ea628e98d0b355d398a9eea
1874         http://crbug.com/25798003
1875
1876         Tests: media/track/regions-webvtt/text-track-region-display.html
1877                media/track/regions-webvtt/text-track-region-dom-layout.html
1878
1879         * html/HTMLMediaElement.cpp:
1880         (WebCore::HTMLMediaElement::parseAttribute):
1881         * html/track/LoadableTextTrack.cpp:
1882         (WebCore::LoadableTextTrack::newRegionsAvailable):
1883         * html/track/TextTrack.cpp:
1884         * html/track/TextTrack.h:
1885         * html/track/TextTrackRegion.cpp:
1886         (WebCore::TextTrackRegion::TextTrackRegion):
1887         (WebCore::TextTrackRegion::appendTextTrackCueBox):
1888         * html/track/TextTrackRegion.h:
1889         * html/track/VTTCue.cpp:
1890         (WebCore::VTTCue::VTTCue):
1891         (WebCore::VTTCue::notifyRegionWhenRemovingDisplayTree):
1892         (WebCore::VTTCue::removeDisplayTree):
1893         * html/track/VTTCue.h:
1894         * html/track/WebVTTParser.cpp:
1895         (WebCore::WebVTTParser::parseBytes):
1896         (WebCore::WebVTTParser::collectMetadataHeader):
1897         * html/track/WebVTTParser.h:
1898
1899 2014-03-18  Andreas Kling  <akling@apple.com>
1900
1901         Share MemoryPressureHandler::releaseMemory() between platforms.
1902         <https://webkit.org/b/130416>
1903
1904         Move the code that scours WebKit for things we can free up right now
1905         to the common part of MemoryPressureHandler. This will enable other
1906         platforms to do the same thing under pressure.
1907
1908         There's now also a platformReleaseMemory() where platform-specific
1909         pressure relief stuff can go.
1910
1911         Reviewed by Antti Koivisto.
1912
1913         * platform/MemoryPressureHandler.cpp:
1914         (WebCore::MemoryPressureHandler::releaseMemory):
1915         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1916         * platform/MemoryPressureHandler.h:
1917         * platform/mac/MemoryPressureHandlerMac.mm:
1918         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1919         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1920
1921 2014-03-18  Dean Jackson  <dino@apple.com>
1922
1923         [WebGL] Destroy EAGLContext's backing store
1924         https://bugs.webkit.org/show_bug.cgi?id=130439
1925         <rdar://problem/16295217>
1926
1927         Reviewed by Tim Horton.
1928
1929         When a GraphicsContext3D is being destroyed, we should
1930         also remove any EAGLContext backing store.
1931
1932         * platform/graphics/mac/GraphicsContext3DMac.mm:
1933         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1934
1935 2014-03-18  Tim Horton  <timothy_horton@apple.com>
1936
1937         [iOS][WebKit2] Mark layer contents as being opaque if they are
1938         https://bugs.webkit.org/show_bug.cgi?id=130427
1939         <rdar://problem/15540434>
1940
1941         Reviewed by Simon Fraser.
1942
1943         * platform/graphics/GraphicsLayerClient.h:
1944         (WebCore::GraphicsLayerClient::paintsOpaquelyAtNonIntegralScales):
1945         * platform/graphics/ca/GraphicsLayerCA.cpp:
1946         (WebCore::GraphicsLayerCA::updateContentsOpaque):
1947         * rendering/RenderLayerBacking.cpp:
1948         (WebCore::RenderLayerBacking::paintsOpaquelyAtNonIntegralScales):
1949         * rendering/RenderLayerBacking.h:
1950         r159463 stopped us from setting layers opaque if they were being painted
1951         at non-integral scale. This makes sense for compositing layers, which
1952         are painted by arbitrary elements, but the main frame's RenderView
1953         will always paint its entire contents. To restore the opaque contents
1954         optimization to the main frame's tiles, don't de-opaquify layers
1955         belonging to the main frame's RenderView.
1956
1957 2014-03-18  Jeffrey Pfau  <jpfau@apple.com>
1958
1959         Unify <media> element callback registration and unregistration
1960         https://bugs.webkit.org/show_bug.cgi?id=130417
1961
1962         Reviewed by Eric Carlson.
1963
1964         * html/HTMLMediaElement.cpp:
1965         (WebCore::HTMLMediaElement::HTMLMediaElement):
1966         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1967         (WebCore::HTMLMediaElement::registerWithDocument):
1968         (WebCore::HTMLMediaElement::unregisterWithDocument):
1969         (WebCore::HTMLMediaElement::didMoveToNewDocument):
1970         * html/HTMLMediaElement.h:
1971
1972 2014-03-18  Jer Noble  <jer.noble@apple.com>
1973
1974         MediaDocument should set a max-width on its <video> element.
1975         https://bugs.webkit.org/show_bug.cgi?id=114691
1976
1977         Reviewed by Eric Carlson.
1978
1979         Set a style attribute containing max-width:100% and max-height:100% so that large videos
1980         are entirely visible within the browser window bounds.
1981
1982         * html/MediaDocument.cpp:
1983         (WebCore::MediaDocumentParser::createDocumentStructure):
1984
1985 2014-03-18  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1986
1987         [WebRTC] Fix layering violation in RTCStatsRequest
1988         https://bugs.webkit.org/show_bug.cgi?id=130426
1989
1990         Reviewed by Eric Carlson.
1991
1992         RTCStatsRequest::track() should return a MediaStreamTrackPrivate*.
1993
1994         No new tests needed.
1995
1996         * Modules/mediastream/RTCPeerConnection.cpp:
1997         (WebCore::RTCPeerConnection::getStats):
1998         * Modules/mediastream/RTCStatsRequestImpl.cpp:
1999         (WebCore::RTCStatsRequestImpl::create):
2000         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
2001         (WebCore::RTCStatsRequestImpl::track):
2002         * Modules/mediastream/RTCStatsRequestImpl.h:
2003         * platform/mediastream/RTCStatsRequest.h:
2004
2005 2014-03-18  Anders Carlsson  <andersca@apple.com>
2006
2007         Fix a trivial FIXME
2008         https://bugs.webkit.org/show_bug.cgi?id=130432
2009
2010         Reviewed by Tim Horton.
2011
2012         * history/HistoryItem.cpp:
2013         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2014
2015 2014-03-18  Anders Carlsson  <andersca@apple.com>
2016
2017         Begin cleaning up KeyedDecoder and KeyedEncoder
2018         https://bugs.webkit.org/show_bug.cgi?id=130431
2019
2020         Reviewed by Tim Horton.
2021
2022         Rename KeyedDecoder::decodeVerifiedEnum to decodeEnum to match the encode function,
2023         and sort the decode functions to be in the same logical order as the encode functions.
2024
2025         * Modules/indexeddb/IDBKeyData.cpp:
2026         (WebCore::IDBKeyData::decode):
2027         * Modules/indexeddb/IDBKeyPath.cpp:
2028         (WebCore::IDBKeyPath::decode):
2029         * platform/KeyedCoding.h:
2030         (WebCore::KeyedDecoder::decodeEnum):
2031
2032 2014-03-18  Darin Adler  <darin@apple.com>
2033
2034         Reduce use of deprecatedCharacters in WebCore
2035         https://bugs.webkit.org/show_bug.cgi?id=130318
2036
2037         Reviewed by Andreas Kling.
2038
2039         * Modules/indexeddb/IDBKeyPath.cpp:
2040         (WebCore::IDBKeyPathLexer::IDBKeyPathLexer): Use StringView for parsing.
2041         (WebCore::IDBKeyPathLexer::lex): Ditto.
2042         (WebCore::IDBKeyPathLexer::lexIdentifier): Ditto.
2043
2044         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
2045         (WebCore::IDBLevelDBCoding::encodeString): Index directly into string instead of
2046         using deprecatedCharacters.
2047
2048         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2049         (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): Use
2050         StringView::getCharactersWithUpconvert.
2051         (WebCore::ThreadableWebSocketChannelClientWrapper::setExtensions): Ditto.
2052
2053         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2054         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
2055         Use operator NSString * instead of explicitly creating an NSString.
2056
2057         * bindings/js/SerializedScriptValue.cpp:
2058         (WebCore::writeLittleEndianUInt16): Added.
2059         (WebCore::CloneSerializer::serialize): Added a separate code path for 8-bit strings.
2060         (WebCore::CloneSerializer::write): Ditto.
2061
2062         * bindings/objc/WebScriptObject.mm:
2063         (+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
2064         Use operator NSString * instead of explicitly creating an NSString.
2065
2066         * dom/Document.cpp:
2067         (WebCore::Document::parseQualifiedName): Index directly into string instead of
2068         using deprecatedCharacters.
2069         * editing/CompositeEditCommand.cpp:
2070         (WebCore::containsOnlyWhitespace): Ditto.
2071         * editing/SmartReplace.cpp:
2072         (WebCore::addAllCodePoints): Ditto.
2073         (WebCore::getSmartSet): Use StringView::upconvertedCharacters.
2074
2075         * editing/TextIterator.cpp:
2076         (WebCore::foldQuoteMarksAndSoftHyphens): Changed to return a value so it can be
2077         used in initialization rather than assignment.
2078         (WebCore::SearchBuffer::SearchBuffer): Use StringView::upconvertedCharacters.
2079
2080         * editing/TypingCommand.cpp:
2081         (WebCore::TypingCommand::insertText): Index directly into string instead of using
2082         deprecatedCharacters.
2083         * editing/VisiblePosition.cpp:
2084         (WebCore::VisiblePosition::characterAfter): Ditto.
2085         * editing/VisibleUnits.cpp:
2086         (WebCore::startOfParagraph): Ditto.
2087         (WebCore::endOfParagraph): Ditto.
2088
2089         * fileapi/WebKitBlobBuilder.cpp:
2090         (WebCore::BlobBuilder::append): Pass a StringView to TextEncoding::encode.
2091
2092         * html/BaseDateAndTimeInputType.cpp:
2093         (WebCore::BaseDateAndTimeInputType::parseToDateComponents): Use
2094         StringView::upconvertedCharacters.
2095
2096         * html/FormDataList.cpp:
2097         (WebCore::FormDataList::appendString): Pass a StringView to TextEncoding::encode.
2098
2099         * html/canvas/CanvasRenderingContext2D.cpp:
2100         (WebCore::normalizeSpaces): Use StringView::getCharactersWithUpconvert.
2101
2102         * html/parser/HTMLParserIdioms.cpp:
2103         (WebCore::stripLeadingAndTrailingHTMLSpaces): Use characters16 for a code path
2104         that already handled 8-bit characters separately.
2105         (WebCore::parseHTMLNonNegativeInteger): Ditto.
2106         (WebCore::parseDescriptors): Added an 8-bit code path.
2107
2108         * inspector/InspectorStyleSheet.cpp:
2109         (WebCore::InspectorStyle::newLineAndWhitespaceDelimiters): Index directly into
2110         string instead of using deprecatedCharacters.
2111         * inspector/InspectorStyleTextEditor.cpp:
2112         (WebCore::InspectorStyleTextEditor::insertProperty): Ditto.
2113         (WebCore::InspectorStyleTextEditor::internalReplaceProperty): Ditto.
2114
2115         * page/ContentSecurityPolicy.cpp:
2116         (WebCore::isSourceListNone): Use StringView::upconvertedCharacters.
2117         (WebCore::CSPSourceList::parse): Ditto.
2118         (WebCore::NonceDirective::parse): Ditto.
2119         (WebCore::MediaListDirective::parse): Ditto.
2120         (WebCore::CSPDirectiveList::parse): Ditto.
2121         (WebCore::CSPDirectiveList::parseReportURI): Ditto.
2122         (WebCore::CSPDirectiveList::parseReflectedXSS): Ditto.
2123         (WebCore::ContentSecurityPolicy::didReceiveHeader): Ditto.
2124
2125         * page/PageSerializer.cpp:
2126         (WebCore::PageSerializer::serializeFrame): Pass a StringView into
2127         TextEncoding::encode.
2128         (WebCore::PageSerializer::serializeCSSStyleSheet): Ditto.
2129
2130         * platform/Length.cpp:
2131         (WebCore::countCharacter): Index directly into string instead of using
2132         deprecatedCharacters. Also changed to take a StringImpl&.
2133         (WebCore::newCoordsArray): Ditto. Call countCharacter the new way, and
2134         use StringView::upconvertedCharacters.
2135         (WebCore::newLengthArray): Ditto.
2136
2137         * platform/LinkHash.cpp:
2138         (WebCore::visitedLinkHash): Use characters16 for the 16-bit path.
2139         Also removed unused visitedURL function.
2140         * platform/LinkHash.h: Removed unused visitedURL function.
2141
2142         * platform/SharedBuffer.cpp:
2143         (WebCore::utf8Buffer): Added an 8-bit code path.
2144         * platform/URL.cpp:
2145         (WebCore::URL::port): Ditto.
2146         (WebCore::encodeRelativeString): Use StringView to call TextEncoding::encode.
2147
2148         * platform/graphics/Color.cpp:
2149         (WebCore::Color::parseHexColor): Use characters16 in the 16-bit path.
2150         (WebCore::Color::Color): Ditto.
2151
2152         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
2153         (WebCore::harfBuzzGetGlyph): Use StringView to call TextEncoding::encode.
2154
2155         * platform/graphics/StringTruncator.cpp:
2156         (WebCore::centerTruncateToBuffer): Use StringView::getCharactersWithUpconvert.
2157         (WebCore::rightTruncateToBuffer): Ditto.
2158         (WebCore::rightClipToCharacterBuffer): Ditto.
2159         (WebCore::rightClipToWordBuffer): Ditto.
2160         (WebCore::leftTruncateToBuffer): Ditto.
2161         (WebCore::truncateString): Ditto.
2162
2163         * platform/graphics/TextRun.h:
2164         (WebCore::TextRun::TextRun): Use characters16 in the 16-bit code path.
2165
2166         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2167         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
2168         Use StringView::upconvertedCharacters.
2169
2170         * platform/network/DataURL.cpp:
2171         (WebCore::handleDataURL): Use StringView to call TextEncoding::encode.
2172         * platform/network/FormDataBuilder.cpp:
2173         (WebCore::FormDataBuilder::addFilenameToMultiPartHeader): Ditto.
2174
2175         * platform/sql/SQLiteStatement.cpp:
2176         (WebCore::SQLiteStatement::bindBlob): Use StringView::upconvertedCharacters.
2177         (WebCore::SQLiteStatement::bindText): Ditto.
2178
2179         * platform/text/DecodeEscapeSequences.h:
2180         (WebCore::Unicode16BitEscapeSequence::decodeRun): Changed to take a StringView.
2181         (WebCore::URLEscapeSequence::decodeRun): Ditto.
2182         (WebCore::decodeEscapeSequences): Pass StringView to decodeRun.
2183
2184         * platform/text/Hyphenation.cpp:
2185         (WebCore::lastHyphenLocation): Take a StringView.
2186         * platform/text/Hyphenation.h: Make lastHyphenLocation take a StringView.
2187
2188         * platform/text/TextBreakIterator.cpp:
2189         (WebCore::initializeIteratorWithRules): Use StringView::upconvertedCharacters.
2190
2191         * platform/text/TextEncoding.cpp:
2192         (WebCore::TextEncoding::encode): Use StringView::upconvertedCharacters.
2193         Change argument type to StringView.
2194         * platform/text/TextEncoding.h: Ditto.
2195
2196         * platform/text/TextEncodingRegistry.cpp:
2197         (WebCore::atomicCanonicalTextEncodingName): Use characters16 for the 16-bit path.
2198
2199         * platform/text/cf/HyphenationCF.cpp:
2200         (WebCore::lastHyphenLocation): Use StringView::text.createCFStringWithoutCopying.
2201         Change argument type to StringView.
2202
2203         * rendering/RenderBlock.cpp:
2204         (WebCore::RenderBlock::constructTextRun): Use characters16 for the 16-bit path.
2205
2206         * rendering/RenderCombineText.cpp:
2207         (WebCore::RenderCombineText::width): Removed check for null characters pointer,
2208         since the pointer will never be null, and even if it was there would be no need
2209         for an early exit.
2210
2211         * rendering/RenderText.cpp:
2212         (WebCore::maxWordFragmentWidth): Take a StringView.
2213         (WebCore::RenderText::computePreferredLogicalWidths): Pass in a StringView.
2214         * rendering/line/BreakingContextInlineHeaders.h:
2215         (WebCore::tryHyphenating): Ditto.
2216
2217         * rendering/svg/SVGTextLayoutEngine.cpp:
2218         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath): Use
2219         StringView::upconvertedCharacters.
2220
2221         * rendering/svg/SVGTextMetrics.cpp:
2222         (WebCore::SVGTextMetrics::SVGTextMetrics): Use String::substring.
2223
2224         * svg/SVGAngle.cpp:
2225         (WebCore::SVGAngle::setValueAsString): Use StringView::upconvertedCharacters.
2226         * svg/SVGAnimateMotionElement.cpp:
2227         (WebCore::parsePoint): Ditto.
2228         * svg/SVGAnimationElement.cpp:
2229         (WebCore::parseKeySplines): Ditto.
2230         * svg/SVGFitToViewBox.cpp:
2231         (WebCore::SVGFitToViewBox::parseViewBox): Ditto.
2232
2233         * svg/SVGFontData.cpp:
2234         (WebCore::SVGFontData::applySVGGlyphSelection): Pass StringView to
2235         createStringWIthMirroredCharacters.
2236         (WebCore::createStringWithMirroredCharacters): Changed to use StringView and
2237         use indexing into that instead of a characters pointer.
2238
2239         * svg/SVGFontData.h: Removed createStringWithMirroredCharacters member function,
2240         since it has nothing to do with the SVGFontData object. Now it's just a private
2241         helper function in the SVGFontData.cpp source file.
2242
2243         * svg/SVGFontElement.cpp:
2244         (WebCore::SVGFontElement::registerLigaturesInGlyphCache): Index into the string
2245         instead of using deprecatedCharacters.
2246
2247         * svg/SVGGlyphMap.h:
2248         (WebCore::SVGGlyphMap::addGlyph): Use StringView::upconvertedCharacters.
2249         (WebCore::SVGGlyphMap::collectGlyphsForString): Ditto.
2250         * svg/SVGGlyphRefElement.cpp:
2251         (WebCore::SVGGlyphRefElement::parseAttribute): Ditto.
2252         * svg/SVGLength.cpp:
2253         (WebCore::SVGLength::setValueAsString): Ditto.
2254         * svg/SVGLengthList.cpp:
2255         (WebCore::SVGLengthList::parse): Ditto.
2256         * svg/SVGNumberList.cpp:
2257         (WebCore::SVGNumberList::parse): Ditto.
2258         * svg/SVGParserUtilities.cpp:
2259         (WebCore::parseNumberFromString): Ditto.
2260         (WebCore::parseNumberOptionalNumber): Ditto.
2261         (WebCore::parseRect): Ditto.
2262         (WebCore::pointsListFromSVGData): Ditto.
2263         (WebCore::parseGlyphName): Ditto.
2264         (WebCore::parseKerningUnicodeString): Ditto.
2265         (WebCore::parseDelimitedString): Ditto.
2266         * svg/SVGPreserveAspectRatio.cpp:
2267         (WebCore::SVGPreserveAspectRatio::parse): Ditto.
2268         * svg/SVGStringList.cpp:
2269         (WebCore::SVGStringList::parse): Ditto.
2270         * svg/SVGTransformList.cpp:
2271         (WebCore::SVGTransformList::parse): Ditto.
2272         * svg/SVGTransformable.cpp:
2273         (WebCore::SVGTransformable::parseTransformType): Ditto.
2274         * svg/SVGViewSpec.cpp:
2275         (WebCore::SVGViewSpec::parseViewSpec): Ditto.
2276         * svg/SVGZoomAndPan.h:
2277         (WebCore::SVGZoomAndPan::parseAttribute): Ditto.
2278
2279         * xml/XMLHttpRequest.cpp:
2280         (WebCore::XMLHttpRequest::send): Pass a StringView to TextEncoding::encode.
2281
2282         * xml/XSLStyleSheetLibxslt.cpp:
2283         (WebCore::XSLStyleSheet::parseString): Use StringView::upconvertedCharacters.
2284
2285 2014-03-18  Bem Jones-Bey  <bjonesbe@adobe.com>
2286
2287         LayoutBox is a terrible name
2288         https://bugs.webkit.org/show_bug.cgi?id=130351
2289
2290         Reviewed by Simon Fraser.
2291
2292         Rename LayoutBox to CSSBoxType. Also rename the functions and methods
2293         that mention "LayoutBox" to something that makes sense for each
2294         specific situation.
2295
2296         No new tests, no behavior change.
2297
2298         * css/BasicShapeFunctions.cpp:
2299         (WebCore::valueForBasicShape):
2300         (WebCore::basicShapeForValue):
2301         * css/CSSBasicShapes.cpp:
2302         (WebCore::CSSBasicShapeCircle::cssText):
2303         (WebCore::CSSBasicShapeCircle::equals):
2304         (WebCore::CSSBasicShapeEllipse::cssText):
2305         (WebCore::CSSBasicShapeEllipse::equals):
2306         (WebCore::CSSBasicShapePolygon::cssText):
2307         (WebCore::CSSBasicShapePolygon::equals):
2308         (WebCore::CSSBasicShapeInset::cssText):
2309         * css/CSSBasicShapes.h:
2310         (WebCore::CSSBasicShape::referenceBox):
2311         (WebCore::CSSBasicShape::setReferenceBox):
2312         * css/CSSComputedStyleDeclaration.cpp:
2313         (WebCore::shapePropertyValue):
2314         * css/CSSPrimitiveValueMappings.h:
2315         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2316         (WebCore::CSSPrimitiveValue::operator CSSBoxType):
2317         * css/DeprecatedStyleBuilder.cpp:
2318         (WebCore::ApplyPropertyClipPath::applyValue):
2319         (WebCore::ApplyPropertyShape::applyValue):
2320         * page/animation/CSSPropertyAnimation.cpp:
2321         (WebCore::blendFunc):
2322         * rendering/ClipPathOperation.h:
2323         (WebCore::ShapeClipPathOperation::setReferenceBox):
2324         (WebCore::ShapeClipPathOperation::referenceBox):
2325         (WebCore::BoxClipPathOperation::create):
2326         (WebCore::BoxClipPathOperation::referenceBox):
2327         (WebCore::BoxClipPathOperation::BoxClipPathOperation):
2328         * rendering/shapes/Shape.cpp:
2329         (WebCore::Shape::createBoxShape):
2330         * rendering/shapes/Shape.h:
2331         * rendering/shapes/ShapeInfo.cpp:
2332         (WebCore::ShapeInfo<RenderType>::computedShape):
2333         * rendering/shapes/ShapeInfo.h:
2334         * rendering/shapes/ShapeInsideInfo.h:
2335         * rendering/shapes/ShapeOutsideInfo.h:
2336         * rendering/style/BasicShapes.cpp:
2337         (WebCore::BasicShape::canBlend):
2338         * rendering/style/BasicShapes.h:
2339         (WebCore::BasicShape::referenceBox):
2340         (WebCore::BasicShape::setReferenceBox):
2341         (WebCore::BasicShape::BasicShape):
2342         * rendering/style/RenderStyleConstants.h:
2343         * rendering/style/ShapeValue.h:
2344         (WebCore::ShapeValue::createShapeValue):
2345         (WebCore::ShapeValue::createBoxShapeValue):
2346         (WebCore::ShapeValue::cssBox):
2347         (WebCore::ShapeValue::ShapeValue):
2348
2349 2014-03-18  Daniel Bates  <dabates@apple.com>
2350
2351         REGRESSION (r162334): RenderTableCol::styleDidChange uses out-of-date table information
2352         https://bugs.webkit.org/show_bug.cgi?id=129561
2353
2354         Reviewed by Antti Koivisto.
2355
2356         Test: fast/table/update-col-width-and-remove-table-cell-crash.html
2357
2358         Fixes an issue where a table column or table column group may query an out-
2359         of-date model of its associated table as part of its process to propagate
2360         style changes to affected table cells.
2361
2362         * rendering/RenderTableCol.cpp:
2363         (WebCore::RenderTableCol::styleDidChange): Ensure that all sections in the table
2364         are up-to-date before querying for a table cell.
2365         * rendering/RenderTableSection.cpp:
2366         (WebCore::RenderTableSection::recalcCells): Update comment to read well. In
2367         particular, remove the reference to RenderTableSection::fillRowsWithDefaultStartingAtPosition()
2368         as this function was removed in <http://trac.webkit.org/changeset/99919>.
2369         (WebCore::RenderTableSection::setNeedsCellRecalc): Clear the grid preemptively to
2370         to ensure that accessors cannot access stale data. We'll build the grid again
2371         in RenderTableSection::recalcCells().
2372         (WebCore::RenderTableSection::numColumns): Add ASSERT(!m_needsCellRecalc) to assert
2373         that the grid cells are up-to-date. That is, we don't need to calculate them again.
2374         * rendering/RenderTableSection.h: Add ASSERT(!m_needsCellRecalc) or call recalcCellsIfNeeded()
2375         before accessing the grid to ensure that it's up-to-date.
2376
2377 2014-03-18  Daniel Bates  <dabates@apple.com>
2378
2379         REGRESSION (r163560): ASSERTION FAILED: childrenInline() in WebCore::RenderSVGText::layout
2380         https://bugs.webkit.org/show_bug.cgi?id=130346
2381
2382         Reviewed by Andreas Kling.
2383
2384         Following <http://trac.webkit.org/changeset/163560>, SVG inline elements may be treated as block-
2385         level elements depending on their CSS styles (e.g. display: block). But such elements should always
2386         be treated as inline-level elements.
2387
2388         Partially revert <http://trac.webkit.org/changeset/164368> as it addressed a similar issue for
2389         <tspan> and <tref>. Instead we should implement RenderSVGInline::updateFromStyle() to ensure that
2390         RenderSVGInline and any derived classes (e.g. RenderSVGTSpan) are always treated as inline elements
2391         regardless of their CSS style because the SVG text layout code depends on this assumption as part
2392         of a performance optimization. We may want to revaluate the benefits of this optimization with respect
2393         to code clarity and ensuring the code is less error prone.
2394
2395         Test: svg/text/a-display-block.html
2396               svg/text/tref-display-inherit.html
2397
2398         * css/StyleResolver.cpp:
2399         (WebCore::StyleResolver::adjustRenderStyle): Revert changes from <http://trac.webkit.org/changeset/164368>.
2400         * rendering/RenderInline.h:
2401         * rendering/svg/RenderSVGInline.cpp:
2402         (WebCore::RenderSVGInline::updateFromStyle): Added; ensure that RenderSVGInline and any derived
2403         classes are treated as inline elements because the SVG text layout code depends on this assumption.
2404         * rendering/svg/RenderSVGInline.h:
2405
2406 2014-03-18  Hans Muller  <hmuller@adobe.com>
2407
2408         [CSS Shapes] shape-outside: ellipse(50% 50% at) causes crash
2409         https://bugs.webkit.org/show_bug.cgi?id=130366
2410
2411         Reviewed by Andreas Kling.
2412
2413         The BasicShape ellipse and circle functions now report a syntax error
2414         if the "at" keyword is not followed by a position.
2415
2416         The existing parsing tests have been updated to include this case.
2417
2418         * css/CSSParser.cpp:
2419         (WebCore::CSSParser::parseBasicShapeCircle):
2420         (WebCore::CSSParser::parseBasicShapeEllipse):
2421
2422 2014-03-18  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2423
2424         Removing MediaStreamVector typedef
2425         https://bugs.webkit.org/show_bug.cgi?id=130402
2426
2427         Reviewed by Eric Carlson.
2428
2429         * Modules/mediastream/MediaStream.h:
2430         * Modules/mediastream/RTCPeerConnection.cpp:
2431         (WebCore::RTCPeerConnection::getLocalStreams):
2432         (WebCore::RTCPeerConnection::getRemoteStreams):
2433         (WebCore::RTCPeerConnection::getStreamById):
2434         (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
2435         * Modules/mediastream/RTCPeerConnection.h:
2436
2437 >>>>>>> .r165925
2438 2014-03-18  Commit Queue  <commit-queue@webkit.org>
2439
2440         Unreviewed, rolling out r165815.
2441         https://bugs.webkit.org/show_bug.cgi?id=130410
2442
2443         Broke many VTT tests (Requested by bfulgham on #webkit).
2444
2445         Reverted changeset:
2446
2447         "TextTrackRegion Not Implemented"
2448         https://bugs.webkit.org/show_bug.cgi?id=116546
2449         http://trac.webkit.org/changeset/165815
2450
2451 2014-03-18  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
2452
2453         Bad cast with toRenderBox in WebCore::RenderView::repaintViewRectangle
2454         https://bugs.webkit.org/show_bug.cgi?id=129104
2455
2456         Reviewed by Simon Fraser.
2457
2458         We should not cast the renderer of a RenderView's owner to RenderBox
2459         unless we are sure it is one.
2460
2461         Test: plugins/crash-invalid-data-reference.html
2462
2463         * rendering/RenderView.cpp:
2464         (WebCore::RenderView::repaintViewRectangle):
2465
2466 2014-03-18  Andreas Kling  <akling@apple.com>
2467
2468         Micro-optimize element descendant iterator.
2469         <https://webkit.org/b/130384>
2470
2471         Add a slightly more efficient ElementDescendantIterator that keeps a stack
2472         of relevant ancestor siblings instead of walking up the parent chain every
2473         time we run out of children.
2474
2475         Reviewed by Antti Koivisto.
2476
2477         * WebCore.xcodeproj/project.pbxproj:
2478         * dom/ElementDescendantIterator.h: Added.
2479         (WebCore::ElementDescendantIterator::ElementDescendantIterator):
2480         (WebCore::ElementDescendantIterator::operator++):
2481         (WebCore::ElementDescendantConstIterator::ElementDescendantConstIterator):
2482         (WebCore::ElementDescendantConstIterator::operator++):
2483         (WebCore::ElementDescendantIteratorAdapter::ElementDescendantIteratorAdapter):
2484         (WebCore::ElementDescendantIteratorAdapter::begin):
2485         (WebCore::ElementDescendantIteratorAdapter::end):
2486         (WebCore::ElementDescendantConstIteratorAdapter::ElementDescendantConstIteratorAdapter):
2487         (WebCore::ElementDescendantConstIteratorAdapter::begin):
2488         (WebCore::ElementDescendantConstIteratorAdapter::end):
2489         (WebCore::elementDescendants):
2490         * dom/ElementIterator.h:
2491         * dom/SelectorQuery.cpp:
2492         (WebCore::elementsForLocalName):
2493         (WebCore::anyElement):
2494         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
2495         (WebCore::SelectorDataList::executeSingleClassNameSelectorData):
2496         (WebCore::SelectorDataList::executeSingleSelectorData):
2497         (WebCore::SelectorDataList::executeSingleMultiSelectorData):
2498         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
2499
2500 2014-03-18  Antti Koivisto  <antti@apple.com>
2501
2502         Mutating rules returned by getMatchedCSSRules can result in crash
2503         https://bugs.webkit.org/show_bug.cgi?id=130209
2504
2505         Reviewed by Andreas Kling.
2506         
2507         The non-standard getMatchedCSSRules API returns CSSStyleRule objects that don't
2508         have parent stylesheet pointer (as we don't know which sheet the rule originated from).
2509         Mutating the rule via such wrapper can lead to crashes later as we fail to invalidate
2510         the underlying stylesheet.
2511         
2512         Fix by disallowing mutation of style rules that don't have parent sheet pointer. CSSStyleRule
2513         has two mutable properties selectorText and style. The latter gives back CSSStyleDeclaration.
2514         This patch disallows mutations in both cases for CSSStyleRules that don't have parent stylesheet
2515         pointer.
2516         
2517         While it is technically possible to have CSSRules that are legitimately disconnected
2518         from stylesheet (by removing rule from sheet while holding a reference to it) it never
2519         makes sense to mutate such rule as there is no way to do anything with it afterwards.
2520
2521         Tests: fast/css/getMatchedCSSProperties-rule-mutation.html
2522                fast/css/getMatchedCSSRules-crash.html
2523
2524         * css/CSSStyleRule.cpp:
2525         (WebCore::CSSStyleRule::setSelectorText):
2526
2527             Bail out if parent stylesheet is null.
2528
2529         * css/PropertySetCSSStyleDeclaration.cpp:
2530         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
2531         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
2532         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
2533         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
2534         
2535             Allow StyleRuleCSSStyleDeclaration subclass cancel the mutation via
2536             boolean return value from willMutate.
2537
2538         (WebCore::StyleRuleCSSStyleDeclaration::willMutate):
2539         
2540             Disallow mutation if the owning CSSStyleRule is null or has null stylesheet.
2541
2542         (WebCore::StyleRuleCSSStyleDeclaration::didMutate):
2543         
2544             We never get here with null rule or stylesheet anymore.
2545
2546         * css/PropertySetCSSStyleDeclaration.h:
2547         (WebCore::PropertySetCSSStyleDeclaration::willMutate):
2548
2549 2014-03-17  Jeffrey Pfau  <jpfau@apple.com>
2550
2551         <media> elements are not properly moved to new documents' visibility callback lists
2552         https://bugs.webkit.org/show_bug.cgi?id=127711
2553
2554         Reviewed by David Kilzer.
2555
2556         * html/HTMLMediaElement.cpp:
2557         (WebCore::HTMLMediaElement::didMoveToNewDocument):
2558
2559 2014-03-18  Filip Pizlo  <fpizlo@apple.com>
2560
2561         More FTL enabling.
2562
2563         Rubber stamped by Dan Bernstein and Mark Hahnenberg.
2564
2565         No new tests.
2566
2567         * Configurations/FeatureDefines.xcconfig:
2568
2569 2014-03-18  Brent Fulgham  <bfulgham@apple.com>
2570
2571         TextTrackRegion Not Implemented
2572         https://bugs.webkit.org/show_bug.cgi?id=116546
2573
2574         Reviewed by Eric Carlson.
2575
2576         Merged from Blink (patch by vcarbune@chromium.org):
2577         https://chromium.googlesource.com/chromium/blink/+/4940f89a087fea5b5ea628e98d0b355d398a9eea
2578         http://crbug.com/25798003
2579
2580         Tests: media/track/regions-webvtt/text-track-region-display.html
2581                media/track/regions-webvtt/text-track-region-dom-layout.html
2582
2583         * html/HTMLMediaElement.cpp:
2584         (WebCore::HTMLMediaElement::parseAttribute):
2585         * html/track/LoadableTextTrack.cpp:
2586         (WebCore::LoadableTextTrack::newRegionsAvailable):
2587         * html/track/TextTrack.cpp:
2588         * html/track/TextTrack.h:
2589         * html/track/TextTrackRegion.cpp:
2590         (WebCore::TextTrackRegion::TextTrackRegion):
2591         (WebCore::TextTrackRegion::appendTextTrackCueBox):
2592         * html/track/TextTrackRegion.h:
2593         * html/track/VTTCue.cpp:
2594         (WebCore::VTTCue::VTTCue):
2595         (WebCore::VTTCue::notifyRegionWhenRemovingDisplayTree):
2596         (WebCore::VTTCue::removeDisplayTree):
2597         * html/track/VTTCue.h:
2598         * html/track/WebVTTParser.cpp:
2599         (WebCore::WebVTTParser::parseBytes):
2600         (WebCore::WebVTTParser::collectMetadataHeader):
2601         * html/track/WebVTTParser.h:
2602
2603 2014-03-18  Philippe Normand  <pnormand@igalia.com>
2604
2605         [GTK] ResourceLoaderSoup.cpp was added by mistake
2606         https://bugs.webkit.org/show_bug.cgi?id=130396
2607
2608         Reviewed by Carlos Garcia Campos.
2609
2610         This file was committed by mistake in r152778 and is not built by
2611         any port.
2612
2613         * loader/soup/ResourceLoaderSoup.cpp: Removed.
2614
2615 2014-03-18  Andreas Kling  <akling@apple.com>
2616
2617         Rename ElementDescendantIterator to TypedElementDescendantIterator.
2618         Romper-stubbed by Antti "Latte Lung" Koivisto.
2619
2620         * GNUmakefile.list.am:
2621         * WebCore.vcxproj/WebCore.vcxproj:
2622         * WebCore.vcxproj/WebCore.vcxproj.filters:
2623         * WebCore.xcodeproj/project.pbxproj:
2624         * dom/ElementDescendantIterator.h: Removed.
2625         * dom/ElementIterator.h:
2626         * dom/TypedElementDescendantIterator.h: Added.
2627         (WebCore::TypedElementDescendantIterator<ElementType>::TypedElementDescendantIterator):
2628         (WebCore::TypedElementDescendantIterator<ElementType>::operator):
2629         (WebCore::TypedElementDescendantConstIterator<ElementType>::TypedElementDescendantConstIterator):
2630         (WebCore::TypedElementDescendantConstIterator<ElementType>::operator):
2631         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::TypedElementDescendantIteratorAdapter):
2632         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::begin):
2633         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::end):
2634         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::beginAt):
2635         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
2636         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::first):
2637         (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::last):
2638         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::TypedElementDescendantConstIteratorAdapter):
2639         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::begin):
2640         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::end):
2641         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt):
2642         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
2643         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::first):
2644         (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::last):
2645         (WebCore::descendantsOfType):
2646
2647 2014-03-18  Ion Rosca  <rosca@adobe.com>
2648
2649         Add blend mode property to dumped information in GraphicsLayer.
2650         https://bugs.webkit.org/show_bug.cgi?id=130331
2651
2652         Reviewed by Simon Fraser.
2653
2654         Functionality is not changed, therefore no new tests added.
2655         I adjusted the affected test results generated with layerTreeAsText.
2656
2657         * platform/graphics/GraphicsLayer.cpp:
2658         (WebCore::GraphicsLayer::dumpProperties):
2659
2660 2014-03-17  Sergio Villar Senin  <svillar@igalia.com>
2661
2662         webdatabase: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T>
2663         https://bugs.webkit.org/show_bug.cgi?id=130347
2664
2665         Reviewed by Darin Adler.
2666
2667         * Modules/webdatabase/DatabaseTracker.cpp:
2668         (WebCore::DatabaseTracker::openDatabaseMutex):
2669         (WebCore::notificationMutex):
2670         (WebCore::notificationQueue):
2671
2672 2014-03-17  Jer Noble  <jer.noble@apple.com>
2673
2674         Add RemoteCommandListener support to MediaSessionManager.
2675         https://bugs.webkit.org/show_bug.cgi?id=130354
2676
2677         Reviewed by Eric Carlson.
2678
2679         Listen for remote commands in MediaSessionManager.
2680
2681         * platform/audio/MediaSessionManager.cpp:
2682         (WebCore::MediaSessionManager::addSession):
2683         (WebCore::MediaSessionManager::removeSession):
2684         * platform/audio/MediaSessionManager.h:
2685
2686         Add RemoteCommandListener to the project files:
2687         * CMakeLists.txt:
2688         * GNUmakefile.list.am:
2689         * WebCore.vcxproj/WebCore.vcxproj:
2690         * WebCore.vcxproj/WebCore.vcxproj.filters:
2691
2692 2014-03-17  Ryosuke Niwa  <rniwa@webkit.org>
2693
2694         Rewrite WebHTMLConverter::_elementHasOwnBackgroundColor in C++
2695         https://bugs.webkit.org/show_bug.cgi?id=130291
2696
2697         Reviewed by Andreas Kling.
2698
2699         Extracted HTMLConverterCaches::elementHasOwnBackgroundColor.
2700
2701         * platform/mac/HTMLConverter.mm:
2702         (HTMLConverterCaches::elementHasOwnBackgroundColor):
2703         (-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
2704
2705 2014-03-17  Ryosuke Niwa  <rniwa@webkit.org>
2706
2707         Rewrite WebHTMLConverter::_elementIsBlockLevel in C++
2708         https://bugs.webkit.org/show_bug.cgi?id=130287
2709
2710         Reviewed by Andreas Kling.
2711
2712         Rewrote _elementIsBlockLevel as HTMLConverterCaches::isBlockElement. Also removed the code to update
2713         _elementIsBlockLevel in _traverseNode as computing the value of _elementIsBlockLevel is now fast.
2714
2715         * platform/mac/HTMLConverter.h:
2716         * platform/mac/HTMLConverter.mm:
2717         (HTMLConverterCaches::isBlockElement):
2718         (-[WebHTMLConverter _elementIsBlockLevel:]):
2719         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
2720         (-[WebHTMLConverter dealloc]):
2721         (-[WebHTMLConverter init]):
2722
2723 2014-03-17  Ryosuke Niwa  <rniwa@webkit.org>
2724
2725         Rewrite WebHTMLConverter::_getComputedFloat in C++
2726         https://bugs.webkit.org/show_bug.cgi?id=130284
2727
2728         Reviewed by Andreas Kling.
2729
2730         Rewrote _getComputedFloat as HTMLConverterCaches::floatPropertyValueForNode.
2731
2732         * platform/mac/HTMLConverter.h:
2733         * platform/mac/HTMLConverter.mm:
2734         (HTMLConverterCaches::floatPropertyValueForNode):
2735         (-[WebHTMLConverter _getFloat:forNode:property:]): Now that computing the float value is fast, we don't need to
2736         store it in the cache.
2737         (-[WebHTMLConverter dealloc]):
2738         (-[WebHTMLConverter init]):
2739
2740 2014-03-16  Andreas Kling  <akling@apple.com>
2741
2742         HTMLInputElement::defaultEventHandler() shouldn't force style updates.
2743         <https://webkit.org/b/130303>
2744
2745         Move the updateStyleIfNeeded() call down to TextFieldInputType instead
2746         of doing it for every HTMLInputEvent.
2747
2748         There might be a better way to do this; we only want to know about this
2749         specific element's renderer, and don't need the rest of the tree.
2750         This is still an easy hack to avoid a lot of unnecessary work.
2751
2752         Reviewed by Anders Carlsson.
2753
2754         * html/HTMLInputElement.cpp:
2755         (WebCore::HTMLInputElement::defaultEventHandler):
2756         * html/TextFieldInputType.cpp:
2757         (WebCore::TextFieldInputType::forwardEvent):
2758
2759 2014-03-17  Brent Fulgham  <bfulgham@apple.com>
2760
2761         [WebVTT] Extending WebVTT Rendering with Regions
2762         https://bugs.webkit.org/show_bug.cgi?id=109822
2763
2764         Reviewed by Eric Carlson.
2765
2766         Merged from Blink (patch by Victor Carbune vcarbune@chromium.org):
2767         https://chromium.googlesource.com/chromium/blink/+/0cdebc1d76d41bfcb9c4b022e54a4fbff132225d
2768
2769         No new tests, as this feature is not active in default builds. New tests will be added
2770         in an upcoming bug.
2771
2772         * css/mediaControls.css:
2773         (video::-webkit-media-text-track-region):
2774         (video::-webkit-media-text-track-region-container):
2775         (video::-webkit-media-text-track-region-container.scrolling):
2776         (video::-webkit-media-text-track-display):
2777         * html/shadow/MediaControlElements.cpp:
2778         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2779         * html/track/TextTrack.cpp:
2780         (WebCore::TextTrack::~TextTrack):
2781         * html/track/TextTrackCue.cpp:
2782         * html/track/TextTrackRegion.cpp:
2783         (WebCore::TextTrackRegion::TextTrackRegion):
2784         (WebCore::TextTrackRegion::textTrackCueContainerScrollingClass):
2785         (WebCore::TextTrackRegion::textTrackCueContainerShadowPseudoId):
2786         (WebCore::TextTrackRegion::textTrackRegionShadowPseudoId):
2787         (WebCore::TextTrackRegion::appendTextTrackCueBox):
2788         (WebCore::TextTrackRegion::displayLastTextTrackCueBox):
2789         (WebCore::TextTrackRegion::willRemoveTextTrackCueBox):
2790         (WebCore::TextTrackRegion::getDisplayTree):
2791         (WebCore::TextTrackRegion::prepareRegionDisplayTree):
2792         (WebCore::TextTrackRegion::startTimer):
2793         (WebCore::TextTrackRegion::stopTimer):
2794         (WebCore::TextTrackRegion::scrollTimerFired):
2795         * html/track/TextTrackRegion.h:
2796         (WebCore::TextTrackRegion::create):
2797         (WebCore::TextTrackRegion::isScrollingRegion):
2798         (WebCore::TextTrackRegion::ownerDocument):
2799         * html/track/TextTrackRegion.idl:
2800         * html/track/TextTrackRegionList.cpp:
2801         (WebCore::TextTrackRegionList::getRegionById):
2802         * html/track/VTTCue.cpp:
2803         (WebCore::VTTCueBox::applyCSSProperties):
2804         (WebCore::VTTCue::~VTTCue):
2805         (WebCore::VTTCue::setIsActive):
2806         (WebCore::VTTCue::removeDisplayTree):
2807         * html/track/WebVTTParser.cpp:
2808         (WebCore::WebVTTParser::createNewRegion):
2809         * rendering/RenderVTTCue.cpp:
2810         (WebCore::RenderVTTCue::layout):
2811
2812 2014-03-17  Brendan Long  <b.long@cablelabs.com>
2813
2814         [GStreamer] human readable language code for tracks
2815         https://bugs.webkit.org/show_bug.cgi?id=124514
2816
2817         Reviewed by Martin Robinson.
2818
2819         * PlatformEfl.cmake: Add GSTREAMER_TAG_INCLUDE_DIRS and GSTREAMER_TAG_LIBRARIES.
2820         * PlatformGTK.cmake: Same.
2821         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2822         (WebCore::TrackPrivateBaseGStreamer::getLanguageCode): Run language codes though gst_tag_get_language_code_iso_639_1() to make sure they're valid.
2823         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Use getLanguageCode() for languages instead of just getTag().
2824
2825 2014-03-17  Ryosuke Niwa  <rniwa@webkit.org>
2826
2827         [Mac] Rewrite WebHTMLConverter::_computedStringForNode in C++
2828         https://bugs.webkit.org/show_bug.cgi?id=130274
2829
2830         Reviewed by Andreas Kling.
2831
2832         Rewrote WebHTMLConverter::_computedStringForNode as HTMLConverterCaches::propertyValueForNode.
2833
2834         * platform/mac/HTMLConverter.h: Removed unused caches.
2835         * platform/mac/HTMLConverter.mm:
2836         (HTMLConverterCaches::computedStylePropertyForElement): Added use const String& instead of String& on property name.
2837         (HTMLConverterCaches::inlineStylePropertyForElement): Ditto.
2838         (HTMLConverterCaches::propertyValueForNode): Renamed and rewritten from _computedStringForNode.
2839         (-[WebHTMLConverter _stringForNode:property:]): Simply return the computed value instead of storing it in the cache
2840         now that the computing the value is fast.
2841         (-[WebHTMLConverter dealloc]):
2842         (-[WebHTMLConverter init]):
2843
2844 2014-03-17  Andreas Kling  <akling@apple.com>
2845
2846         Remove unnecessary JSC::Handle null checks in bindings code.
2847         <https://webkit.org/b/130356>
2848
2849         Use Handle::slot() directly instead of going through Handle::get().
2850         This avoids null checking the HandleSlot, which isn't necessary here
2851         anyway, and the code already assumes it'll never be null.
2852
2853         Reviewed by Gavin Barraclough.
2854
2855         * bindings/js/JSCSSRuleListCustom.cpp:
2856         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
2857         * bindings/js/JSCSSValueCustom.cpp:
2858         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
2859         (WebCore::JSCSSValueOwner::finalize):
2860         * bindings/js/JSMutationObserverCustom.cpp:
2861         (WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
2862         * bindings/js/JSNodeCustom.cpp:
2863         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
2864         * bindings/js/JSNodeListCustom.cpp:
2865         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
2866         * bindings/js/JSTextTrackCueCustom.cpp:
2867         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
2868         * bindings/js/WebCoreTypedArrayController.cpp:
2869         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
2870         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
2871         * bindings/scripts/CodeGeneratorJS.pm:
2872         (GenerateImplementation):
2873         * bridge/runtime_root.cpp:
2874         (JSC::Bindings::RootObject::finalize):
2875
2876 2014-03-17  Krzysztof Czech  <k.czech@samsung.com>
2877
2878         AX: Reducing some code by using helper function ariaElementsFromAttribute
2879         https://bugs.webkit.org/show_bug.cgi?id=130344
2880
2881         Reviewed by Chris Fleizach.
2882
2883         Change visibility of ariaElementsFromAttribute function from private to protected
2884         so that other classes that derives from AccessibilityRenderObject can use it.
2885
2886         No new tests. No behaviour change.
2887
2888         * accessibility/AccessibilityRenderObject.h:
2889         * accessibility/AccessibilityTableCell.cpp:
2890         (WebCore::AccessibilityTableCell::columnHeaders):
2891
2892 2014-03-16  Brent Fulgham  <bfulgham@apple.com>
2893
2894         Provide preference to enable additional AVFoundation options
2895         https://bugs.webkit.org/show_bug.cgi?id=130275
2896
2897         Reviewed by Eric Carlson.
2898
2899         * html/HTMLMediaElement.cpp:
2900         (WebCore::HTMLMediaElement::doesHaveAttribute): Added.
2901         * html/HTMLMediaElement.h:
2902         * page/Settings.in: Add new attribute.
2903         * platform/graphics/MediaPlayer.cpp:
2904         (WebCore::MediaPlayer::doesHaveAttribute): Added stub to call private player object's
2905         implementation of doesHaveAttribute.
2906         * platform/graphics/MediaPlayer.h:
2907         (WebCore::MediaPlayerClient::doesHaveAttribute):
2908         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2909         (WebCore::MediaPlayerPrivateAVFoundationCF::AVFWrapper::createAssetForURL): Check the <media> object,
2910         and notify AVFoundationCF to use URI option if relevant.
2911         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2912         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Check the <media> object,
2913         and notify AVFoundation to use URI option if relevant.
2914
2915 2014-03-17  Jer Noble  <jer.noble@apple.com>
2916
2917         [EME] Add NULL protections in SourceBuffer and MediaSource.
2918         https://bugs.webkit.org/show_bug.cgi?id=130266
2919
2920         Reviewed by Eric Carlson.
2921
2922         Add NULL checks in places which may be called after a SourceBuffer has been removed:
2923
2924         * Modules/mediasource/MediaSource.cpp:
2925         (WebCore::MediaSource::monitorSourceBuffers): Protect against a SourceBuffer being removed
2926             (and thus activeSourceBuffers being empty) when monitoring source buffer state.
2927         * Modules/mediasource/SourceBuffer.cpp:
2928         (WebCore::SourceBuffer::appendBufferTimerFired): Protect against SourceBuffer being removed.
2929         (WebCore::SourceBuffer::videoTracks): Ditto.
2930         (WebCore::SourceBuffer::audioTracks): Ditto.
2931         (WebCore::SourceBuffer::textTracks): Ditto.
2932         (WebCore::SourceBuffer::setActive): Ditto.
2933         (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Ditto.
2934         (WebCore::SourceBuffer::hasCurrentTime): Ditto.
2935         (WebCore::SourceBuffer::canPlayThrough): Ditto.
2936         (WebCore::SourceBuffer::hasFutureTime): Ditto, and check for an empty buffered ranges.
2937
2938 2014-03-17  Tim Horton  <timothy_horton@apple.com>
2939
2940         WKThumbnailView should support snapshots
2941         https://bugs.webkit.org/show_bug.cgi?id=130335
2942         <rdar://problem/16255139>
2943
2944         Reviewed by Simon Fraser.
2945
2946         * WebCore.exp.in:
2947
2948 2014-01-29  Sergio Villar Senin  <svillar@igalia.com>
2949
2950         [CSS Grid Layout] getComputedStyle() not using author's order when showing named grid lines
2951         https://bugs.webkit.org/show_bug.cgi?id=127837
2952
2953         Reviewed by David Hyatt.
2954
2955         Added a couple of new Vectors to store the names of the grid lines
2956         respecting their order. They will be used to get the right outcome
2957         for getComputedStyle().
2958
2959         * css/CSSComputedStyleDeclaration.cpp:
2960         (WebCore::addValuesForNamedGridLinesAtIndex):
2961         (WebCore::valueForGridTrackList):
2962         * css/StyleResolver.cpp:
2963         (WebCore::createGridTrackList):
2964         (WebCore::StyleResolver::applyProperty):
2965         * rendering/style/RenderStyle.h:
2966         * rendering/style/StyleGridData.cpp:
2967         (WebCore::StyleGridData::StyleGridData):
2968         * rendering/style/StyleGridData.h:
2969         (WebCore::StyleGridData::operator==):
2970
2971 2014-03-17  Zsolt Borbely  <borbezs@inf.u-szeged.hu>
2972
2973         Fix the !ENABLE(PROMISES) build
2974         https://bugs.webkit.org/show_bug.cgi?id=130328
2975
2976         Reviewed by Darin Adler.
2977
2978         Add missing ENABLE(PROMISES) guards.
2979
2980         * bindings/js/JSDOMPromise.cpp:
2981         * bindings/js/JSDOMPromise.h:
2982
2983 2014-03-17  Gurpreet Kaur  <k.gurpreet@samsung.com>
2984
2985         Safari should not render a cell if the <td> is empty
2986         https://bugs.webkit.org/show_bug.cgi?id=15273
2987
2988         Reviewed by Darin Adler.
2989
2990         When table cell has no children and the doctype is not present or not
2991         correct the border for that cell should not be drawn. Firefox also
2992         follows the same behaviour hence making the changes to make it similiar
2993         to Firefox behaviour.
2994
2995         Tests: fast/table/table-cell-border-doctype.html
2996                fast/table/table-cell-border-no-doctype.html
2997
2998         * rendering/RenderTableCell.cpp:
2999         (WebCore::RenderTableCell::paintBoxDecorations):
3000         Added condition for not drawing the border when table cell has no child
3001         and doctype.
3002
3003
3004 2014-03-17  Frédéric Wang  <fred.wang@free.fr>
3005
3006         Fix handling of <annotation> in MathMLTextElement.
3007         https://bugs.webkit.org/show_bug.cgi?id=124128.
3008
3009         Reviewed by Darin Adler.
3010
3011         No new tests.
3012
3013         * mathml/MathMLTextElement.cpp:
3014         (WebCore::MathMLTextElement::createElementRenderer): do not create the special RenderMathMLToken for the <annotation> tag.
3015         (WebCore::MathMLTextElement::childShouldCreateRenderer): only allow text inside <annotation>.
3016
3017 2014-03-17  Martin Robinson  <mrobinson@igalia.com>
3018
3019         [GTK][CMake] Credential storage is not enabled
3020         https://bugs.webkit.org/show_bug.cgi?id=130149
3021
3022         Reviewed by Philippe Normand.
3023
3024         * PlatformGTK.cmake: Add the libsecret include directories and link line to the build.
3025
3026 2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
3027
3028         Unreviewed.
3029
3030         Addressing reviewing comments by Darin in bug #130310 that I forgot
3031         to address before landing the changes in r165732.
3032         https://bugs.webkit.org/show_bug.cgi?id=130310
3033
3034         * rendering/InlineTextBox.cpp:
3035         * rendering/RenderLayer.cpp:
3036         * rendering/RenderObject.cpp:
3037
3038 2014-03-17  Jessie Berlin  <jberlin@apple.com>
3039
3040         Speculative build fix for ENABLE(TELEPHONE_NUMBER_DETECTION) after r165724.
3041
3042         * html/parser/HTMLTreeBuilder.cpp:
3043         (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers):
3044
3045 2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
3046
3047         Only supplement Page with UserMediaController once
3048         https://bugs.webkit.org/show_bug.cgi?id=130311
3049
3050         Reviewed by Darin Adler.
3051
3052         Don't supplement the Page with an UserMediaController object if that Page was
3053         already supplemented with one. This avoids triggering an assertion in
3054         Supplementable::provideSupplement() that ensures no supplement with the same key
3055         exists yet. The cause of this is calling provideUserMediaTo() in the Internals
3056         constructor that's using the same Page for two subsequent tests.
3057
3058         * Modules/mediastream/UserMediaController.cpp:
3059         (WebCore::provideUserMediaTo):
3060
3061 2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
3062
3063         Explicitly include cstdio header for debug builds in InlineTextBox, RenderLayer, RenderObject
3064         https://bugs.webkit.org/show_bug.cgi?id=130310
3065
3066         Reviewed by Darin Adler.
3067
3068         Building the GTK port with Clang through CMake falls into a configuration where
3069         the cstdio header is not indirectly included in InlineTextBox, RenderLayer and
3070         RenderObject source files. fprintf() is required for helper functions that print
3071         out helpful debugging information in debug builds, so the cstdio header should
3072         be included explicitly in that case.
3073
3074         * rendering/InlineTextBox.cpp:
3075         * rendering/RenderLayer.cpp:
3076         * rendering/RenderObject.cpp:
3077
3078 2014-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3079
3080         [GTK] Cleanup WebKitDOMObject
3081         https://bugs.webkit.org/show_bug.cgi?id=130246
3082
3083         Reviewed by Martin Robinson.
3084
3085         Remove unneeded getter and fix coding style.
3086
3087         * bindings/gobject/WebKitDOMObject.cpp:
3088         (webkitDOMObjectSetProperty):
3089         (webkit_dom_object_class_init):
3090
3091 2014-03-17  Darin Adler  <darin@apple.com>
3092
3093         Stop using deprecatedCharacters in HTMLTreeBuilder
3094         https://bugs.webkit.org/show_bug.cgi?id=130323
3095
3096         Reviewed by Andreas Kling.
3097
3098         Keeping this separate from other patches because of concern that this could affect
3099         page load performance.
3100
3101         * html/parser/HTMLTreeBuilder.cpp:
3102         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
3103         Use a StringView instead of a character pointer.
3104         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::isEmpty): Ditto.
3105         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
3106         Ditto.
3107         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemaining): Ditto.
3108         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo): Ditto.
3109         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace): Ditto.
3110         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeading): Ditto.
3111         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeading): Ditto.
3112         (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers): Use StringView::upconvertedCharacters.
3113
3114 2014-03-17  Jinwoo Song  <jinwoo7.song@samsung.com>
3115
3116         Make some Module class constructors return PassRef.
3117         https://bugs.webkit.org/show_bug.cgi?id=130282
3118
3119         Reviewed by Andreas Kling.
3120
3121         Make the constructor helpers for the following classes return PassRef
3122         instead of PassRefPtr since they will never return null.
3123          - GamepadList
3124          - Geolocation
3125          - NavigatorContentUtils
3126          - NetworkInfoConnection
3127          - Notification
3128          - NotificationCenter
3129          - DeviceProximityEvent
3130
3131         * Modules/gamepad/GamepadList.h:
3132         (WebCore::GamepadList::create):
3133         * Modules/geolocation/Geolocation.cpp:
3134         (WebCore::Geolocation::create):
3135         * Modules/geolocation/Geolocation.h:
3136         (WebCore::Geolocation::GeoNotifier::create):
3137         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
3138         (WebCore::NavigatorContentUtils::create):
3139         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
3140         * Modules/networkinfo/NetworkInfoConnection.cpp:
3141         (WebCore::NetworkInfoConnection::create):
3142         * Modules/networkinfo/NetworkInfoConnection.h:
3143         * Modules/notifications/Notification.cpp:
3144         (WebCore::Notification::create):
3145         * Modules/notifications/Notification.h:
3146         * Modules/notifications/NotificationCenter.cpp:
3147         (WebCore::NotificationCenter::create):
3148         * Modules/notifications/NotificationCenter.h:
3149         * Modules/proximity/DeviceProximityEvent.h:
3150         (WebCore::DeviceProximityEvent::create):
3151
3152 2014-03-16  Mihnea Ovidenie  <mihnea@adobe.com>
3153
3154         [CSSRegions]Do not compute region range for a box unless the parent has one
3155         https://bugs.webkit.org/show_bug.cgi?id=130249
3156
3157         Reviewed by Andrei Bucur.
3158
3159         If the containing block does not have a region range computed, do not attempt to compute
3160         a region range for a child. In such cases, the range computation for a child can lead to
3161         a result that is wrong, possibly leading to an incorrect clipping.
3162
3163         Test: fast/regions/inline-block-flowed-in-regions.html
3164
3165         * rendering/RenderBlock.cpp:
3166         (WebCore::canComputeRegionRangeForBox):
3167         (WebCore::RenderBlock::computeRegionRangeForBoxChild):
3168         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
3169         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
3170         * rendering/RenderFlowThread.h:
3171
3172 2014-03-16  Andreas Kling  <akling@apple.com>
3173
3174         CSSValueList should assert that no null values are added to it.
3175         <https://webkit.org/b/130315>
3176
3177         Add assertions in CSSValueList's append() and prepend() that we are
3178         not adding a null value. This caught a single place in CSSParser
3179         that was appending an alread-released RefPtr to a CSSValueList.
3180         That list was eventually discarded anyway (due to "foundClip" now
3181         being true), so the fix is simply to remove the adding.
3182
3183         Eventually we should use Ref and PassRef all over for CSSValueList,
3184         this is just a first step on the way.
3185
3186         Reviewed by Darin Adler.
3187
3188         * css/CSSParser.cpp:
3189         (WebCore::CSSParser::parseFillShorthand):
3190         * css/CSSValueList.h:
3191         (WebCore::CSSValueList::append):
3192         (WebCore::CSSValueList::prepend):
3193
3194 2014-03-16  Praveen R Jadhav  <praveen.j@samsung.com>
3195
3196         AudioBufferSourceNode stop attribute shouldn't throw exception in finished state.
3197         https://bugs.webkit.org/show_bug.cgi?id=130000.
3198
3199         Reviewed by Jer Noble.
3200
3201         AudioBufferSourceNode may go to FINISHED_STATE even before "stop" method is called 
3202         as silence rendered after audio data is played out when its not looping.
3203         A call to "stop" method after this shouldn't throw exception.
3204
3205         * Modules/webaudio/AudioScheduledSourceNode.cpp:
3206         (WebCore::AudioScheduledSourceNode::stop):
3207
3208 2014-03-16  Brian Burg  <bburg@apple.com>
3209
3210         Web Inspector: generated backend commands should reflect build system ENABLE settings
3211         https://bugs.webkit.org/show_bug.cgi?id=130111
3212
3213         Reviewed by Timothy Hatcher.
3214
3215         Add guards for conditional inspector domains.
3216
3217         For Makefile-based build systems, force regeneration of the
3218         combined file if the list of domains has changed.
3219
3220         Combine only the Inspector domains listed in INSPECTOR_DOMAINS,
3221         instead of globbing any .json file.
3222
3223         * CMakeLists.txt:
3224         * DerivedSources.make:
3225         * GNUmakefile.am:
3226
3227 2014-03-16  David Kilzer  <ddkilzer@apple.com>
3228
3229         Follow-up: Double values passed to fabsf() in maxScaleFromTransform()
3230         <http://webkit.org/b/130297>
3231
3232         Reviewed by Darin Adler.
3233
3234         * platform/graphics/ca/GraphicsLayerCA.cpp:
3235         (WebCore::maxScaleFromTransform): Use narrowPrecisionToFloat()
3236         instead of static_cast<float>().
3237
3238 2014-03-16  Andreas Kling  <akling@apple.com>
3239
3240         ScriptExecutionContext::vm() should return a reference.
3241         <https://webkit.org/b/129611>
3242
3243         Every ScriptExecutionContext has a VM, so this can never return null.
3244         Made WorkerScriptController::vm() return a reference as well, since
3245         that was needed for this change.
3246
3247         Reviewed by Geoffrey Garen.
3248
3249         * bindings/js/WorkerScriptController.h:
3250         (WebCore::WorkerScriptController::vm):
3251         * bindings/js/WorkerScriptDebugServer.cpp:
3252         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
3253         * css/ElementRuleCollector.cpp:
3254         (WebCore::ElementRuleCollector::ruleMatches):
3255         * dom/ScriptExecutionContext.cpp:
3256         (WebCore::ScriptExecutionContext::vm):
3257         * dom/ScriptExecutionContext.h:
3258         * dom/SelectorQuery.cpp:
3259         (WebCore::SelectorDataList::execute):
3260         * html/HTMLCanvasElement.cpp:
3261         (WebCore::HTMLCanvasElement::createImageBuffer):
3262         * xml/XMLHttpRequest.cpp:
3263         (WebCore::XMLHttpRequest::dropProtection):
3264         * testing/Internals.cpp:
3265         (WebCore::Internals::parserMetaData):
3266
3267 2014-03-16  Zan Dobersek  <zdobersek@igalia.com>
3268
3269         Remove OwnPtr.h, PassOwnPtr.h header inclusions in Source/WebCore/html/parser/ code
3270         https://bugs.webkit.org/show_bug.cgi?id=129667
3271
3272         Reviewed by Anders Carlsson.
3273
3274         Remove unnecessary inclusions of the OwnPtr.h and PassOwnPtr.h headers
3275         in the code under Source/WebCore/html/parser/.
3276
3277         * html/parser/HTMLParserScheduler.h:
3278         * html/parser/HTMLToken.h:
3279         * html/parser/HTMLTreeBuilder.h:
3280         * html/parser/XSSAuditor.h:
3281         * html/parser/XSSAuditorDelegate.h:
3282
3283 2014-03-16  Darin Adler  <darin@apple.com>
3284
3285         Remove uses of "cat" in DerivedSources.make outside platform-specific rules
3286         https://bugs.webkit.org/show_bug.cgi?id=130307
3287
3288         Reviewed by Anders Carlsson.
3289
3290         * DerivedSources.make: Use "perl -pe ''" instead of "cat".
3291
3292 2014-03-16  Brian Burg  <bburg@apple.com>
3293
3294         Web Inspector: vended backend commands file should be generated as part of the build
3295         https://bugs.webkit.org/show_bug.cgi?id=130110
3296
3297         Reviewed by Timothy Hatcher.
3298
3299         * WebCore.xcodeproj/project.pbxproj: Copy InspectorWebBackendCommands.js to the
3300         private headers directory.
3301
3302 2014-03-16  Frédéric Wang  <fred.wang@free.fr>
3303
3304         [regression] foreign content not displayed in MathML
3305         <https://webkit.org/b/124128>
3306
3307         Reviewed by Chris Fleizach.
3308
3309         This restores foreign content in <mtext>, <mn> and <mi> elements, but only when it is "phrasing content" as defined per the HTML5 specification. Other token elements are not handled here. This change makes mspace-units.html work again on Linux.
3310
3311         Tests: mathml/presentation/foreign-mi-dynamic.html
3312                mathml/presentation/foreign-mi.html
3313                mathml/presentation/foreign-mn.html
3314                mathml/presentation/foreign-mtext-rejected.html
3315                mathml/presentation/foreign-mtext.html
3316
3317         * mathml/MathMLTextElement.cpp:
3318         (WebCore::MathMLTextElement::createElementRenderer): create a RenderMathMLToken for mn, ms and mtext.
3319         (WebCore::isPhrasingContent): helper function to check phrasing content, as defined by the HTML spec.
3320         (WebCore::MathMLTextElement::childShouldCreateRenderer): <mi>, <mn>, <mtext> and, <ms> now accepts phrasing content.
3321         * rendering/mathml/RenderMathMLToken.cpp:
3322         (WebCore::RenderMathMLToken::RenderMathMLToken):
3323         (WebCore::RenderMathMLToken::updateTokenContent): initialize the m_containsElement boolean when updating the token content.
3324         (WebCore::RenderMathMLToken::updateStyle): move <mi> specific handling in its own section and only apply the single-char rule when it does not contain elements.
3325         * rendering/mathml/RenderMathMLToken.h: add an m_containsElement boolean to handle token element specifically.
3326
3327 2014-03-16  David Kilzer  <ddkilzer@apple.com>
3328
3329         PlatformTimeRanges::nearest() truncates closestDelta values from double to float
3330         <http://webkit.org/b/130298>
3331
3332         Reviewed by Darin Adler.
3333
3334         Fixes the following build failures using trunk clang:
3335
3336             WebCore/platform/graphics/PlatformTimeRanges.cpp:210:28: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
3337                         closestDelta = fabsf(startTime - time);
3338                                        ^
3339             WebCore/platform/graphics/PlatformTimeRanges.cpp:210:28: note: use function 'fabs' instead
3340                         closestDelta = fabsf(startTime - time);
3341                                        ^~~~~
3342                                        fabs
3343             WebCore/platform/graphics/PlatformTimeRanges.cpp:214:28: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
3344                         closestDelta = fabsf(endTime - time);
3345                                        ^
3346             WebCore/platform/graphics/PlatformTimeRanges.cpp:214:28: note: use function 'fabs' instead
3347                         closestDelta = fabsf(endTime - time);
3348                                        ^~~~~
3349                                        fabs
3350
3351         * platform/graphics/PlatformTimeRanges.cpp:
3352         (WebCore::PlatformTimeRanges::nearest): Extract start and end
3353         time deltas into local variables so they don't have to be
3354         computed twice, using fabs() instead of fabsf().
3355
3356 2014-03-16  Darin Adler  <darin@apple.com>
3357
3358         Optimize hasTagName when called on an HTMLElement
3359         https://bugs.webkit.org/show_bug.cgi?id=130090
3360
3361         Reviewed by Antti Koivisto.
3362
3363         Added new hasTagName functions that have the efficiency of hasLocalName.
3364         but are safe.
3365
3366         Now we can always use hasTagName, and we'll get a compile time error if
3367         we try to use an SVG tag name with an HTML element. All call sites that
3368         use the more specific tag name types are more efficient, and call sites
3369         that have a specific pointer type will get even more efficient checking
3370         that is exactly what we used to get by calling hasLocalName.
3371
3372         * accessibility/AccessibilityObject.cpp:
3373         (WebCore::AccessibilityObject::hasTagName): Cast explicitly to Element
3374         since Node::hasTagName no longer works on a general QualifiedName.
3375         * accessibility/AccessibilityRenderObject.cpp:
3376         (WebCore::AccessibilityRenderObject::isDescendantOfElementType): Use
3377         more specific type, RenderElement, so we can call hasTagName on Element
3378         instead of Node; eliminates an unnecessary branch.
3379
3380         * accessibility/AccessibilityTableColumn.cpp: Added now-needed include.
3381         * accessibility/atk/AccessibilityObjectAtk.cpp: Ditto.
3382
3383         * dom/DocumentStyleSheetCollection.cpp:
3384         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets): Use
3385         new for loop and full words for variable names. Also use nullptr instead
3386         of 0. Call toHTMLElement and toSVGElement in code that checks hasTagName
3387         since it's already checking isHTMLElement and isSVGElement.
3388
3389         * dom/Element.cpp:
3390         (WebCore::attrNodeListMap): Use NeverDestroyed and put the vectors into
3391         the map rather than putting pointers to a vector into the map.
3392         (WebCore::attrNodeListForElement): Take a reference rather than a pointer,
3393         and update for the change above.
3394         (WebCore::ensureAttrNodeListForElement): Ditto.
3395         (WebCore::removeAttrNodeListForElement): Ditto.
3396         (WebCore::findAttrNodeInList): Ditto.
3397         (WebCore::Element::isFocusable): Use lineageOfType<HTMLCanvasElement>
3398         to fine the canvas rather than a hand-written loop.
3399         (WebCore::Element::attrNodeList): Update for above changes.
3400         (WebCore::Element::setAttributeNode): Ditto.
3401         (WebCore::Element::attrIfExists): Ditto.
3402         (WebCore::Element::ensureAttr): Ditto.
3403         (WebCore::Element::detachAttrNodeFromElementWithValue): Ditto.
3404         (WebCore::Element::detachAllAttrNodesFromElement): Ditto.
3405
3406         * dom/Element.h: Removed the overload of hasLocalName that takes a
3407         QualifiedName and ignores the non-local-name parts of it. Callers should
3408         use hasTagName instead, now that it's optimized appropriately. Added
3409         overloads of hasTagName for all the specific qualified name types. It's
3410         more efficient to use the Node versions of these functions rather than
3411         using QualifiedName::matches to do the check. Removed the hasTagName and
3412         hasLocalName functions from the Node class; the only convenience functions
3413         needed in Node are the specific checks for tags from HTML, MathML, and SVG,
3414         not the general purpose ones.
3415
3416         * dom/Node.h: Removed hasLocalName and replaced the single hasTagName
3417         that takes a QualifiedName with three faster ones that take HTML, MathML,
3418         and SVG qualified names instead. Also updated to use nullptr instead of 0.
3419
3420         * dom/PositionIterator.cpp: Added now-needed include.
3421         * dom/Text.cpp: Ditto.
3422
3423         * dom/make_names.pl:
3424         (printHeaderHead): Renamed an argument for clarity and added a definitions
3425         argument, which is where we insert the classes derived from QualifiedName.
3426         (printCppHead): Renamed an argument for clarity.
3427         (printTypeHelpers): Use hasTagName rather than hasLocalName, since the
3428         former is now optimized to be the same as what the latter was.
3429         (printNamesHeaderFile): Define a class derived from QualifiedName that can
3430         be used at compile time to avoid having to check the namespace.
3431         (printNamesCppFile): Use the new more-specific type as needed.
3432
3433         * editing/ApplyStyleCommand.cpp:
3434         (WebCore::isLegacyAppleStyleSpan): Use hasTagName instead of hasLocalName,
3435         and references instead of pointers.
3436         (WebCore::ApplyStyleCommand::ApplyStyleCommand): Removed uneeded explicit
3437         construction of a smart pointer.
3438         (WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun): Updated to use
3439         the enclosingElementWithTag function by its new name.
3440
3441         * editing/Editor.cpp:
3442         (WebCore::Editor::selectionUnorderedListState): Updated to use the
3443         enclosingElementWithTag function by its new name.
3444         (WebCore::Editor::selectionOrderedListState): Ditto.
3445
3446         * editing/InsertListCommand.cpp:
3447         (WebCore::InsertListCommand::doApply): Use a more-specific type for the list tag.
3448         (WebCore::InsertListCommand::doApplyForSingleParagraph): Ditto.
3449         * editing/InsertListCommand.h: Ditto.
3450
3451         * editing/MarkupAccumulator.cpp:
3452         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces): Added an explicit
3453         cast to Element in the loop that is already guarded by an isElementNode check.
3454         Also use a modern C++ for loop.
3455
3456         * editing/ReplaceSelectionCommand.cpp:
3457         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
3458         Updated to use the enclosingElementWithTag function by its new name.
3459         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Ditto.
3460         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): Ditto.
3461
3462         * editing/TypingCommand.cpp: Added now-needed includes.
3463         * editing/VisibleUnits.cpp: Ditto.
3464
3465         * editing/htmlediting.cpp:
3466         (WebCore::enclosingElementWithTag): Changed to return an Element instead of a Node,
3467         since nodes other than elements do not have tags.
3468         * editing/htmlediting.h: Ditto.
3469
3470         * editing/mac/EditorMac.mm:
3471         (WebCore::Editor::adjustedSelectionRange): Updated to use the enclosingElementWithTag
3472         function by its new name.
3473