[WinCairo][Video] Windows Media Foundation implementation is not completed.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-01-19  peavo@outlook.com  <peavo@outlook.com>
2
3         [WinCairo][Video] Windows Media Foundation implementation is not completed.
4         https://bugs.webkit.org/show_bug.cgi?id=140337
5
6         Reviewed by Alex Christensen.
7
8         This patch aims to complete some of the methods which are not implemented.
9         Currently, only MP4 is supported.
10         Video is rendered in a child window of the main window.
11         We should eventually render the video directly in the main window,
12         by reading and painting individual video frames from the stream.
13
14         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
15         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
16         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
17         (WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes):
18         (WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
19         (WebCore::MediaPlayerPrivateMediaFoundation::load):
20         (WebCore::MediaPlayerPrivateMediaFoundation::play):
21         (WebCore::MediaPlayerPrivateMediaFoundation::pause):
22         (WebCore::MediaPlayerPrivateMediaFoundation::naturalSize):
23         (WebCore::MediaPlayerPrivateMediaFoundation::hasVideo):
24         (WebCore::MediaPlayerPrivateMediaFoundation::hasAudio):
25         (WebCore::MediaPlayerPrivateMediaFoundation::setVisible):
26         (WebCore::MediaPlayerPrivateMediaFoundation::paused):
27         (WebCore::MediaPlayerPrivateMediaFoundation::readyState):
28         (WebCore::MediaPlayerPrivateMediaFoundation::didLoadingProgress):
29         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
30         (WebCore::MediaPlayerPrivateMediaFoundation::paint):
31         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
32         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
33         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
34         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
35         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
36         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
37         (WebCore::MediaPlayerPrivateMediaFoundation::addBranchToPartialTopology):
38         (WebCore::MediaPlayerPrivateMediaFoundation::VideoViewWndProc):
39         (WebCore::MediaPlayerPrivateMediaFoundation::registerVideoWindowClass):
40         (WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):
41         (WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow):
42         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
43         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
44         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource):
45         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
46         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
47         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
48         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::QueryInterface):
49         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AddRef):
50         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Release):
51         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::GetParameters):
52         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
53         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
54
55 2015-01-19  Brian J. Burg  <burg@cs.washington.edu>
56
57         Web Replay: convert to is<T> and downcast<T> for decoding replay inputs
58         https://bugs.webkit.org/show_bug.cgi?id=140512
59
60         Reviewed by Chris Dumez.
61
62         No new tests, no behavior changed.
63
64         * replay/EventLoopInput.h: Make overridden methods public.
65         * replay/MemoizedDOMResult.h: Add type trait specialization here. It is
66         special-cased because the input type parameter doesn't work with macros.
67         * replay/SerializationMethods.cpp:
68         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
69         Use is() and downcast() when dispatching to encoders based on type.
70
71 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
72
73         Replace use of WTF::bind() in MemoryPressureHandlerLinux.cpp with a C++ lambda
74         https://bugs.webkit.org/show_bug.cgi?id=140614
75
76         Reviewed by Carlos Garcia Campos.
77
78         Use a C++ lambda instead of WTF::bind() in the MemoryPressureHandler
79         implementation for Linux.
80
81         * platform/linux/MemoryPressureHandlerLinux.cpp:
82         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
83
84 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
85
86         Replace uses of WTF::bind() in MockMediaPlayerMediaSource with C++ lambdas
87         https://bugs.webkit.org/show_bug.cgi?id=140612
88
89         Reviewed by Philippe Normand.
90
91         Use C++ lambdas in place of WTF::bind() in the MockMediaPlayerMediaSource class.
92
93         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
94         (WebCore::MockMediaPlayerMediaSource::play):
95         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
96         (WebCore::MockMediaPlayerMediaSource::seekCompleted):
97
98 2015-01-19  Commit Queue  <commit-queue@webkit.org>
99
100         Unreviewed, rolling out r178653.
101         https://bugs.webkit.org/show_bug.cgi?id=140634
102
103         Broke multiple SVG tests on Mountain Lion (Requested by ap on
104         #webkit).
105
106         Reverted changeset:
107
108         "[SVG -> OTF Converter] Flip the switch on"
109         https://bugs.webkit.org/show_bug.cgi?id=140592
110         http://trac.webkit.org/changeset/178653
111
112 2015-01-19  Brent Fulgham  <bfulgham@apple.com>
113
114         Layers need to be already updated before we call adjustViewSize
115         https://bugs.webkit.org/show_bug.cgi?id=135514
116
117         Reviewed by Simon Fraser.
118
119         Tested by 'fast/dynamic/layer-no-longer-paginated.html'
120
121         Defer painting operations until we have finished layout. This
122         has a couple of benefits:
123         (1) We do not attempt to modify render layers during layout.
124         (2) In WK1 we do not attempt to paint during layout.
125
126         Add a new virtual predicate to ScrollView indicating when we are in
127         layout so that calls to setContentsSize do not attempt
128         to adjust scrollbars.
129
130         Modify FrameView to set its ScrollView state to block paint
131         operations during layout. Also add a post-layout handler to
132         complete the scrollbar updates after layout is finished.
133
134         * WebCore.exp.in: Move linker symbol to ScrollView (from FrameView).
135         * page/FrameView.cpp:
136         (WebCore::FrameView::layout):
137         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
138         (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Removed (Renamed).
139         (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added (Renamed)
140         (WebCore::FrameView::paintContents): Do not paint if we are inside view size adjustment.
141         * page/FrameView.h:
142         * platform/ScrollView.cpp:
143         (WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Added. Checks whether we need to defer
144         painting, and calls virtual scrollPositionChangedViaPlatformWidgetImpl if we do not.
145         (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added.
146         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
147         (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
148         the scroll delta and apply it after the layout is complete.
149         (WebCore::ScrollView::completeUpdatesAfterScrollTo): Split off part of 'scrollTo' into its own method
150         so we can reuse it in handleDeferredScrollUpdateAfterContentSizeChange.
151         * platform/ScrollView.h:
152         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
153
154 2015-01-16  Ada Chan  <adachan@apple.com>
155
156         HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly muted by script.
157         https://bugs.webkit.org/show_bug.cgi?id=140524
158
159         Reviewed by Andreas Kling.
160
161         Test: media/muted-video-is-playing-audio.html
162
163         * html/HTMLMediaElement.cpp:
164         (WebCore::HTMLMediaElement::setMuted):
165         Call Document::updateIsPlayingAudio() to recalculate the overall audio playing state.
166         (WebCore::HTMLMediaElement::isPlayingAudio):
167         HTMLMediaElement::isPlayingAudio() should return false if the media element is explicitly muted.
168
169 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
170
171         [SVG -> OTF Converter] Flip the switch on
172         https://bugs.webkit.org/show_bug.cgi?id=140592
173
174         Reviewed by Antti Koivisto.
175
176         * Configurations/FeatureDefines.xcconfig:
177
178 2015-01-16  Alexey Proskuryakov  <ap@apple.com>
179
180         Console log sometimes prefixed with line number
181         https://bugs.webkit.org/show_bug.cgi?id=105280
182
183         Reviewed by Darin Adler.
184
185         Improve the logic for determining whether a console message should be associated
186         with a source code location.
187
188         * dom/ScriptableDocumentParser.h:
189         * html/parser/HTMLDocumentParser.cpp:
190         (WebCore::HTMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
191         * html/parser/HTMLDocumentParser.h:
192         * page/PageConsoleClient.cpp:
193         (WebCore::getParserLocationForConsoleMessage):
194         (WebCore::PageConsoleClient::addMessage):
195         * xml/parser/XMLDocumentParser.cpp:
196         (WebCore::XMLDocumentParser::pauseParsing):
197         * xml/parser/XMLDocumentParser.h:
198         * xml/parser/XMLDocumentParserLibxml2.cpp:
199         (WebCore::XMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
200
201 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
202
203         [SVG -> OTF Converter] Glyphs get clipped weirdly
204         https://bugs.webkit.org/show_bug.cgi?id=137095
205
206         Reviewed by Antti Koivisto.
207
208         The Adobe CFF spec doesn't actually tell you how to serialize a
209         "FontBBox." After trial and error, it seems to be (x, y, width,
210         height).
211
212         Test: svg/text/kerning.svg
213               svg/W3C-SVG-1.1/fonts-kern-01-t.svg
214
215         * svg/SVGToOTFFontConversion.cpp:
216         (WebCore::SVGToOTFFontConverter::appendHEADTable):
217         (WebCore::SVGToOTFFontConverter::appendCFFTable):
218         (WebCore::SVGToOTFFontConverter::appendVHEATable):
219         (WebCore::CFFBuilder::CFFBuilder):
220         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
221         (WebCore::SVGToOTFFontConverter::processGlyphElement):
222
223 2015-01-19  Csaba Osztrogonác  <ossy@webkit.org>
224
225         REGRESSION(r178486): It broke the !ENABLE(VIDEO) build
226         https://bugs.webkit.org/show_bug.cgi?id=140611
227
228         Reviewed by Eric Carlson.
229
230         * testing/Internals.cpp:
231         (WebCore::Internals::elementIsBlockingDisplaySleep):
232         * testing/Internals.h:
233
234 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
235
236         [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
237         https://bugs.webkit.org/show_bug.cgi?id=139059
238
239         Reviewed by David Hyatt.
240
241         Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
242
243         * rendering/RenderGrid.cpp:
244         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
245
246 2015-01-18  Alexey Proskuryakov  <ap@apple.com>
247
248         Update bindings generation test results after <https://trac.webkit.org/changeset/178633>.
249
250         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
251         (WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
252         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
253         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
254         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
255         * bindings/scripts/test/JS/JSTestObj.cpp:
256         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
257         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
258
259 2015-01-18  Chris Dumez  <cdumez@apple.com>
260
261         Generate matchingShorthandsForLonghand() implementation from CSSPropertyNames.in
262         https://bugs.webkit.org/show_bug.cgi?id=140599
263
264         Reviewed by Antti Koivisto.
265
266         Generate matchingShorthandsForLonghand() implementation from
267         CSSPropertyNames.in. We already have all the information we need in
268         CSSPropertyNames.in to generate the big switch() in
269         matchingShorthandsForLonghand().
270
271         A few shorthands still aren't generated. I will look into getting rid
272         of the custom code in a follow-up patch.
273
274         * css/StylePropertyShorthand.cpp:
275         (WebCore::makeVector): Deleted.
276         (WebCore::matchingShorthandsForLonghand): Deleted.
277         * css/StylePropertyShorthand.h:
278         (WebCore::matchingCustomShorthandsForLonghand):
279         * css/makeprop.pl:
280         (constructShorthandsVector):
281
282 2015-01-18  Dean Jackson  <dino@apple.com>
283
284         Out of bounds write in canvas.toDataURL
285         https://bugs.webkit.org/show_bug.cgi?id=140594
286         <rdar://problem/19449135>
287
288         Reviewed by Alexey Proskuryakov.
289
290         In the case where we have a canvas object that does
291         not have premultiplied alpha (an option you can select
292         when using WebGL) we have to multiply out the alpha when
293         converting to JPEG via toDataURL.
294
295         For this we created a buffer, but were not accurately
296         resizing it before flattening the alpha.
297
298         Test: fast/canvas/webgl/toDataURL-unpremultipliedAlpha.html
299
300         * platform/graphics/cg/ImageBufferCG.cpp:
301         (WebCore::ImageDataToDataURL): Call resize once we've
302         determined we have enough space.
303
304 2015-01-17  Sam Weinig  <sam@webkit.org>
305
306         Add initial experimental user content filtering API
307         https://bugs.webkit.org/show_bug.cgi?id=140584
308
309         Reviewed by Benjamin Poulain.
310
311         Change content extensions to be managed through the UserContentController.
312
313         * WebCore.exp.in:
314         Update exports.
315
316         * WebCore.xcodeproj/project.pbxproj:
317         Update for removed files.
318
319         * contentextensions/ContentExtensionsBackend.cpp:
320         (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists):
321         (WebCore::ContentExtensions::ContentExtensionsBackend::sharedInstance): Deleted.
322         * contentextensions/ContentExtensionsBackend.h:
323         Remove concept of a shared instance and add a removeAllRuleLists() function.
324         
325         * contentextensions/ContentExtensionsInterface.cpp: Removed.
326         * contentextensions/ContentExtensionsInterface.h: Removed.
327         Since there is no shared instance anymore, checking if a URL should be blocked
328         now has to go directly to the backend.
329         
330         * contentextensions/ContentExtensionsManager.cpp:
331         (WebCore::ContentExtensions::ExtensionsManager::createRuleList):
332         (WebCore::ContentExtensions::ExtensionsManager::loadExtension): Deleted.
333         * contentextensions/ContentExtensionsManager.h:
334         Update interface to accommodate the lack of a shared instance. Now, all this
335         file does is take a serialized rule list and outputs the Vector of ContentExtensionRules
336
337         * loader/cache/CachedResourceLoader.cpp:
338         (WebCore::CachedResourceLoader::requestResource):
339         Check with the UserContentController to see if the URL should be blocked.
340
341         * page/UserContentController.cpp:
342         (WebCore::UserContentController::addUserContentFilter):
343         (WebCore::UserContentController::removeAllUserContentFilters):
344         (WebCore::UserContentController::contentFilterBlocksURL):
345         * page/UserContentController.h:
346         Add single point of interaction for both the WebKit level to add and remove
347         content filters and WebCore to check to see if URLs should be blocked.
348
349 2015-01-18  Darin Adler  <darin@apple.com>
350
351         REGRESSION (r125251): wrapper lifetimes of SVGElementInstance are incorrect
352         https://bugs.webkit.org/show_bug.cgi?id=132148
353
354         Reviewed by Anders Carlsson.
355
356         Test: svg/custom/use-instanceRoot-event-listeners.xhtml
357
358         * bindings/js/JSDOMWindowCustom.cpp:
359         (WebCore::JSDOMWindow::addEventListener): Updated for the new return type
360         of JSListener::create. For the event type, use JSString::toAtomicString instead of
361         calling JSString::value and then converting to an AtomicString.
362         (WebCore::JSDOMWindow::removeEventListener): Same changes as for addEventListener.
363
364         * bindings/js/JSEventListener.cpp:
365         (WebCore::forwardsEventListeners): Added. Helper to detect the special case needed
366         for SVGElementInstance. In the future, for better encapsulation, we could use virtual
367         functions, but for now hard coding this single class seems fine.
368         (WebCore::correspondingElementWrapper): Added. For use if forwardsEventListeners
369         returns true, to find out where event listeners will be forwarded.
370         (WebCore::createJSEventListenerForAttribute): Added. Replaces the old function
371         createJSAttributeEventListener, for SVGElementInstance attributes only.
372         (WebCore::createJSEventListenerForAdd): Added. Helper function to avoid repeated
373         generated code in the addElementListener bindings other than the DOMWindow one.
374
375         * bindings/js/JSEventListener.h:
376         (WebCore::JSEventListener::create): Changed to return a Ref instead of a PassRefPtr.
377         (WebCore::createJSEventListenerForAttribute): Renamed from createJSAttributeEventListener,
378         changed to return a RefPtr instead of a PassRefPtr and to take references rather than
379         pointers for non-null things.
380         (WebCore::createJSEventListenerForRemove): Added. Small wrapper that calls
381         createJSEventListenerForAdd since they are currently identical.
382
383         * bindings/scripts/CodeGeneratorJS.pm:
384         (GenerateAttributeEventListenerCall): Removed the special case for JSSVGElementInstance
385         and updated to call the new createJSEventListenerForAttribute. The special case for
386         SVGElementInstance is now in JSEventListener.h/cpp, which is nicer since we prefer to
387         keep the generated code simpler if possible.
388         (GenerateEventListenerCall): Removed the special case for JSSVGElementInstance. This
389         has been dead code since the explicit definition of add/removeEventListener was removed
390         from SVGElementInstance.idl, and was also a problem if someone were to use the
391         addEventListener function from EventTarget on an SVGElementInstance object. The function
392         needs to be generic at runtime. Use toAtomicString as in JSDOMWindow::addEventListener above.
393         Call the two new functions, createJSEventListenerForAdd and createJSEventListenerForRemove.
394         Those new functions properly handle SVGElementInstance.
395         (GenerateImplementation): Don't pass the class name to GenerateAttributeEventListenerCall
396         or GenerateEventListenerCall any more.
397         (GenerateConstructorDefinition): Use JSString::toAtomicString instead of calling
398         JSString::value and then converting to AtomicString.
399
400 2015-01-17  Brian J. Burg  <burg@cs.washington.edu>
401
402         Web Inspector: highlight data for overlay should use protocol type builders
403         https://bugs.webkit.org/show_bug.cgi?id=129441
404
405         Reviewed by Timothy Hatcher.
406
407         As a first step towards cleaning up the inspector overlay, convert highlight
408         data construction to use protocol type builders. It's now really obvious what
409         data is being sent to the inspector overlay page.
410
411         This change paves the way towards using inspector protocol commands and events
412         if we want to support more interactive functionality in the inspector overlay.
413
414         This patch makes a few style cleanups, such as standardizing variable names,
415         using default member initializers, passing by reference, and fixing casts.
416
417         No new tests, no behavior changed.
418
419         * WebCore.exp.in:
420         * inspector/InspectorController.cpp:
421         (WebCore::InspectorController::getHighlight):
422         (WebCore::InspectorController::buildObjectForHighlightedNode):
423         (WebCore::InspectorController::inspect): Deleted.
424         * inspector/InspectorController.h:
425         * inspector/InspectorOverlay.cpp:
426         (WebCore::buildRendererHighlight):
427         (WebCore::buildNodeHighlight):
428         (WebCore::buildQuadHighlight):
429         (WebCore::InspectorOverlay::InspectorOverlay):
430         (WebCore::InspectorOverlay::getHighlight):
431         (WebCore::buildObjectForPoint):
432         (WebCore::buildObjectForRect):
433         (WebCore::buildArrayForQuad):
434         (WebCore::buildObjectForHighlight):
435         (WebCore::buildObjectForRegion):
436         (WebCore::buildObjectForFlowRegions):
437         (WebCore::buildObjectForSize):
438         (WebCore::buildQuadObjectForCSSRegionContentClip):
439         Simplify how the clipping area is encoded. It's now 'regionClippingArea'
440         stored on a FragmentHighlightData instance.
441
442         (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
443         (WebCore::InspectorOverlay::drawPaintRects):
444         (WebCore::buildArrayForRendererFragments):
445         (WebCore::appendPathCommandAndPoints):
446         (WebCore::appendPathSegment):
447         (WebCore::buildObjectForShapeOutside):
448         (WebCore::buildObjectForElementData):
449         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
450         (WebCore::InspectorOverlay::drawNodeHighlight):
451         (WebCore::InspectorOverlay::drawQuadHighlight):
452         (WebCore::InspectorOverlay::reset):
453         (WebCore::buildObjectForRegionHighlight): Deleted.
454         (WebCore::buildObjectForCSSRegionsHighlight): Deleted.
455         (WebCore::buildObjectForCSSRegionContentClip): Deleted.
456         (WebCore::buildObjectForRendererFragments): Deleted.
457         (WebCore::buildObjectForElementInfo): Deleted.
458         * inspector/InspectorOverlay.h:
459         (WebCore::Highlight::Highlight):
460         * inspector/InspectorOverlayPage.js:
461         (_createElementTitle):
462         (_drawElementTitle):
463         (_drawFragmentHighlight):
464         (drawNodeHighlight):
465         * testing/Internals.cpp:
466         (WebCore::Internals::inspectorHighlightRects):
467         (WebCore::Internals::inspectorHighlightObject):
468
469 2015-01-17  Myles C. Maxfield  <mmaxfield@apple.com>
470
471         [SVG -> OTF Converter] Crashes when SVG font is invalid
472         https://bugs.webkit.org/show_bug.cgi?id=140378
473
474         Reviewed by Antti Koivisto.
475
476         Because CachedSVGFonts are cached, they have to be able to be used
477         in subsequent documents regardless how the first document left it.
478
479         Tests: fast/css/font-face-svg-decoding-error.html
480                svg/custom/svg-fonts-in-html.html
481                svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
482
483         * loader/cache/CachedFont.cpp:
484         (WebCore::CachedFont::ensureCustomFontData):
485         * loader/cache/CachedFont.h:
486         * loader/cache/CachedSVGFont.cpp:
487         (WebCore::CachedSVGFont::getFontData):
488         (WebCore::CachedSVGFont::ensureCustomFontData):
489         (WebCore::CachedSVGFont::maybeInitializeExternalSVGFontElement):
490         * loader/cache/CachedSVGFont.h:
491
492 2015-01-17  Chris Dumez  <cdumez@apple.com>
493
494         Converting time, angle and frequency units in CSS calc() function
495         https://bugs.webkit.org/show_bug.cgi?id=138356
496
497         Reviewed by Darin Adler.
498
499         Update CSSPrimitiveValue::primitiveType() to actually query the
500         primitiveType of the CSSCalcValue instead of assuming a given
501         type based on its category (e.g. If category is CalcTime, then
502         assume type is CSS_MS, even though it would be CSS_S as well).
503
504         This would like to calculation errors such as:
505         calc(4s + 1s) -> 5ms
506
507         Because we would assume the unit is CSS_MS without actually
508         checking.
509
510         This patch is inspired by the following Blink revision
511         by <rhodovan.u-szeged@partner.samsung.com> and initial WebKit
512         patch from <tmeszaros.u-szeged@partner.samsung.com>:
513         https://src.chromium.org/viewvc/blink?view=rev&revision=179101
514
515         Test: fast/css/calc-with-angle-time-frequency.html
516
517         * css/CSSCalculationValue.h:
518         (WebCore::CSSCalcValue::primitiveType):
519         * css/CSSPrimitiveValue.cpp:
520         (WebCore::CSSPrimitiveValue::primitiveType):
521
522 2015-01-17  Chris Dumez  <cdumez@apple.com>
523
524         Generate shorthandForProperty() implementation from CSSPropertyNames.in
525         https://bugs.webkit.org/show_bug.cgi?id=140556
526
527         Reviewed by Darin Adler.
528
529         Generate shorthandForProperty() implementation from CSSPropertyNames.in.
530         This is just a big switch() statement calling the right
531         StylePropertyShorthand factory function for a given CSSPropertyID.
532
533         * css/StylePropertyShorthand.cpp:
534         (WebCore::shorthandForProperty): Deleted.
535         * css/StylePropertyShorthand.h:
536         * css/makeprop.pl:
537
538 2015-01-16  Brent Fulgham  <bfulgham@apple.com>
539
540         [Mac] Correct infinite loop in Wheel Handler code in EventHandlerMac
541         https://bugs.webkit.org/show_bug.cgi?id=140564
542         <rdar://problem/19386426.
543
544         Reviewed by Dean Jackson.
545
546         * page/mac/EventHandlerMac.mm:
547         (WebCore::latchingIsLockedToAncestorOfThisFrame): Put missing assignment
548         back into the loop!
549
550 2015-01-16  Zalan Bujtas  <zalan@apple.com>
551
552         When border-radius is present, inset/outset/groove/ridge border color changes.
553         https://bugs.webkit.org/show_bug.cgi?id=140551
554
555         Reviewed by Simon Fraser.
556
557         This patch applies the same color lighten/darken adjustment on the radius borders
558         that we use for non-radius border.
559
560         Test: fast/borders/wrong-border-color-when-radius-is-present.html
561
562         * rendering/RenderBoxModelObject.cpp:
563         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
564         * rendering/RenderObject.cpp:
565         (WebCore::RenderObject::calculateBorderStyleColor):
566         * rendering/RenderObject.h:
567
568 2015-01-16  Pratik Solanki  <psolanki@apple.com>
569
570         Web pages fail to load using public iOS WebKit; ASSERT(!isMainThread()) in
571         -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]
572         https://bugs.webkit.org/show_bug.cgi?id=140470
573
574         Reviewed by Alexey Proskuryakov.
575
576         Fixes an issue where a web page would fail to load in iOS WebKit2 built with the public iOS SDK
577         because NSURLConnection callbacks were always being scheduled on the main thread.
578
579         Currently we always schedule NSURLConnection callbacks to occur on the WebThread or the main
580         thread depending on whether the WebThread was started. In iOS WebKit2, the callbacks were
581         always being scheduled on the main thread regardless of whether we were using the NetworkProcess
582         (since the WebThread is only started when using WebKit1). This led to an assertion failure.
583         Instead we want to schedule callbacks to an NSOperationsQueue queue when using WebKit2 with the
584         NetworkProcess (i.e. ResourceHandleClient::usesAsyncCallbacks() is true), on the main thread when
585         using WebKit2 without the NetworkProcess and on the WebThread when using WebKit1.
586
587         * platform/network/mac/ResourceHandleMac.mm:
588         (WebCore::operationQueueForAsyncClients): Remove PLATFORM(IOS)-guards as we want to make use
589         of this code for iOS WebKit2 with the NetworkProcess.
590         (WebCore::ResourceHandle::start): Modified to use the existing Mac code path to conditionally
591         schedule NSURLConnection callbacks to an operation queue when ResourceHandleClient::usesAsyncCallbacks()
592         is true. Otherwise, schedule the callbacks on the run loop returned by WebThreadNSRunLoop(),
593         which is either the WebThread or the main thread run loop when using WebKit1 and WebKit2 without
594         the NetworkProcess, respectively.
595
596 2015-01-16  Brian J. Burg  <burg@cs.washington.edu>
597
598         Web Replay: purge remaining PassRefPtr uses and minor cleanup
599         https://bugs.webkit.org/show_bug.cgi?id=140456
600
601         Reviewed by Andreas Kling.
602
603         Get rid of PassRefPtr. Introduce default initializers where it makes sense. Change
604         uses of ASSERT to ASSERT_ARG when the assert is a precondition on an argument.
605
606         Remove mistaken uses of AtomicString that were not removed as part of r174113.
607
608         No new tests, no behavior changed.
609
610         * inspector/InspectorReplayAgent.cpp:
611         (WebCore::SerializeInputToJSONFunctor::operator()):
612         (WebCore::SerializeInputToJSONFunctor::returnValue):
613         (WebCore::InspectorReplayAgent::sessionCreated):
614         (WebCore::InspectorReplayAgent::sessionModified):
615         (WebCore::InspectorReplayAgent::sessionLoaded):
616         (WebCore::InspectorReplayAgent::segmentCreated):
617         (WebCore::InspectorReplayAgent::segmentCompleted):
618         (WebCore::InspectorReplayAgent::segmentLoaded):
619         (WebCore::InspectorReplayAgent::switchSession):
620         (WebCore::InspectorReplayAgent::insertSessionSegment):
621         (WebCore::InspectorReplayAgent::removeSessionSegment):
622         (WebCore::InspectorReplayAgent::findSession):
623         (WebCore::InspectorReplayAgent::findSegment):
624         * inspector/InspectorReplayAgent.h:
625         * replay/CapturingInputCursor.cpp:
626         (WebCore::CapturingInputCursor::CapturingInputCursor):
627         (WebCore::CapturingInputCursor::create):
628         (WebCore::CapturingInputCursor::loadInput):
629         * replay/CapturingInputCursor.h:
630         * replay/EventLoopInputDispatcher.cpp:
631         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
632         * replay/EventLoopInputDispatcher.h:
633         * replay/FunctorInputCursor.h:
634         (WebCore::FunctorInputCursor::FunctorInputCursor):
635         (WebCore::FunctorInputCursor::loadInput):
636         * replay/ReplayController.cpp:
637         (WebCore::ReplayController::ReplayController):
638         (WebCore::ReplayController::setForceDeterministicSettings):
639         (WebCore::ReplayController::setSessionState):
640         (WebCore::ReplayController::setSegmentState):
641         (WebCore::ReplayController::switchSession):
642         (WebCore::ReplayController::createSegment):
643         (WebCore::ReplayController::completeSegment):
644         (WebCore::ReplayController::loadSegmentAtIndex):
645         (WebCore::ReplayController::unloadSegment):
646         (WebCore::ReplayController::frameNavigated):
647         (WebCore::ReplayController::loadedSession):
648         (WebCore::ReplayController::loadedSegment):
649         (WebCore::ReplayController::activeInputCursor):
650         (WebCore::ReplayController::dispatcher):
651         * replay/ReplayController.h:
652         * replay/ReplaySession.cpp:
653         (WebCore::ReplaySession::create):
654         (WebCore::ReplaySession::at):
655         (WebCore::ReplaySession::appendSegment):
656         (WebCore::ReplaySession::insertSegment):
657         (WebCore::ReplaySession::removeSegment):
658         * replay/ReplaySession.h:
659         * replay/ReplaySessionSegment.cpp:
660         (WebCore::ReplaySessionSegment::create):
661         (WebCore::ReplaySessionSegment::ReplaySessionSegment):
662         * replay/ReplaySessionSegment.h:
663         * replay/ReplayingInputCursor.cpp:
664         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
665         (WebCore::ReplayingInputCursor::create):
666         (WebCore::ReplayingInputCursor::loadInput):
667         * replay/ReplayingInputCursor.h:
668         * replay/SegmentedInputStorage.cpp:
669         (WebCore::SegmentedInputStorage::store):
670         (WebCore::SegmentedInputStorage::queue):
671         (WebCore::SegmentedInputStorage::SegmentedInputStorage): Deleted.
672         * replay/SegmentedInputStorage.h:
673
674 2015-01-16  Andreas Kling  <akling@apple.com>
675
676         Remove assertion that Page::m_editorClient is non-null.
677
678         Unreviewed debug build fix. (It's a reference, it won't be null.)
679
680         * page/Page.cpp:
681         (WebCore::Page::Page):
682
683 2015-01-16  Andreas Kling  <akling@apple.com>
684
685         Page::editorClient() should return a reference.
686         <https://webkit.org/b/140552>
687
688         Reviewed by Chris Dumez.
689
690         Page always has an EditorClient, so make editorClient() return a reference.
691
692         * editing/AlternativeTextController.cpp:
693         (WebCore::AlternativeTextController::editorClient):
694         (WebCore::AlternativeTextController::textChecker):
695         * editing/Editor.cpp:
696         (WebCore::Editor::client):
697         * editing/SpellChecker.cpp:
698         (WebCore::SpellChecker::client):
699         * page/FocusController.cpp:
700         (WebCore::FocusController::setFocusedElement):
701         * page/Page.cpp:
702         (WebCore::Page::Page):
703         (WebCore::Page::~Page):
704         (WebCore::Page::clearUndoRedoOperations):
705         * page/Page.h:
706         (WebCore::Page::editorClient):
707         * page/scrolling/AsyncScrollingCoordinator.cpp:
708         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
709
710 2015-01-16  Benjamin Poulain  <benjamin@webkit.org>
711
712         Make URL filters case-insensitive by default
713         https://bugs.webkit.org/show_bug.cgi?id=140531
714
715         Reviewed by Andreas Kling.
716
717         Safari's filters were case-insensitive. Adopt that convention in the engine,
718         and add a flag in case someone ever need a case-sensitive filter.
719
720         * contentextensions/ContentExtensionRule.h:
721         * contentextensions/ContentExtensionsBackend.cpp:
722         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
723         * contentextensions/ContentExtensionsManager.cpp:
724         (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
725         * contentextensions/URLFilterParser.cpp:
726         (WebCore::ContentExtensions::trivialAtomFromASCIICharacter):
727         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
728         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
729         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
730         (WebCore::ContentExtensions::URLFilterParser::addPattern):
731         * contentextensions/URLFilterParser.h:
732
733 2015-01-16  Benjamin Poulain  <bpoulain@apple.com>
734
735         Add the alternative syntax for CSS Selector's descendant combinator (">>")
736         https://bugs.webkit.org/show_bug.cgi?id=140525
737
738         Reviewed by Antti Koivisto.
739
740         The latest Selector spec introduces the combinator ">>" as an alias for the descendant
741         relation: http://dev.w3.org/csswg/selectors-4/#descendant-combinators
742
743         This patch implements that combinator as an alias of the existing one. For CSSOM's selector
744         serialization, I use one bit of CSSSelector to store if that alternative syntax was used.
745
746         Tests: fast/css/descendant-combinator-doubled-child-syntax-styling.html
747                fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html
748                fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html
749                fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html
750                fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html
751
752         * css/CSSGrammar.y.in:
753         * css/CSSParserValues.cpp:
754         (WebCore::CSSParserSelector::appendTagHistory):
755         * css/CSSParserValues.h:
756         (WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax):
757         * css/CSSSelector.cpp:
758         (WebCore::CSSSelector::selectorText):
759         * css/CSSSelector.h:
760         (WebCore::CSSSelector::setDescendantUseDoubleChildSyntax):
761         (WebCore::CSSSelector::CSSSelector):
762
763 2015-01-16  Chris Dumez  <cdumez@apple.com>
764
765         Generate StylePropertyShorthand.* from CSSPropertyNames.in
766         https://bugs.webkit.org/show_bug.cgi?id=140501
767
768         Reviewed by Darin Adler.
769
770         Add initial support for having makeprop.pl generate most of
771         StylePropertyShorthand.* from CSSPropertyNames.in.
772
773         This patch replaces [Shorthand] parameter in CSSPropertyNames.in by a
774         more descriptive [Longhands=property1|property2|...] parameter. With
775         this information, makeprop.pl is now able to generate the
776         StylePropertyShorthand factories for all CSS shorthand properties
777         in a new StylePropertyShorthandFunctions.h header.
778
779         The switches in StylePropertyShorthand.cpp could also be generated
780         but this will be taken care of in follow-up patches to reduce patch
781         size.
782
783         * CMakeLists.txt:
784         * DerivedSources.make:
785         * WebCore.vcxproj/WebCore.vcxproj:
786         * WebCore.vcxproj/WebCore.vcxproj.filters:
787         * WebCore.xcodeproj/project.pbxproj:
788         * css/CSSComputedStyleDeclaration.cpp:
789         (WebCore::ComputedStyleExtractor::propertyValue):
790         * css/CSSParser.cpp:
791         (WebCore::CSSParser::parseValue):
792         * css/CSSPropertyNames.in:
793         * css/StyleProperties.cpp:
794         (WebCore::StyleProperties::getPropertyValue):
795         * css/StylePropertyShorthand.cpp:
796         (WebCore::shorthandForProperty):
797         (WebCore::matchingShorthandsForLonghand):
798         (WebCore::backgroundShorthand): Deleted.
799         (WebCore::backgroundPositionShorthand): Deleted.
800         (WebCore::backgroundRepeatShorthand): Deleted.
801         (WebCore::borderShorthand): Deleted.
802         (WebCore::borderBottomShorthand): Deleted.
803         (WebCore::borderColorShorthand): Deleted.
804         (WebCore::borderImageShorthand): Deleted.
805         (WebCore::borderLeftShorthand): Deleted.
806         (WebCore::borderRadiusShorthand): Deleted.
807         (WebCore::webkitBorderRadiusShorthand): Deleted.
808         (WebCore::borderRightShorthand): Deleted.
809         (WebCore::borderSpacingShorthand): Deleted.
810         (WebCore::borderStyleShorthand): Deleted.
811         (WebCore::borderTopShorthand): Deleted.
812         (WebCore::borderWidthShorthand): Deleted.
813         (WebCore::listStyleShorthand): Deleted.
814         (WebCore::marginShorthand): Deleted.
815         (WebCore::markerShorthand): Deleted.
816         (WebCore::outlineShorthand): Deleted.
817         (WebCore::overflowShorthand): Deleted.
818         (WebCore::paddingShorthand): Deleted.
819         (WebCore::transitionShorthand): Deleted.
820         (WebCore::animationShorthand): Deleted.
821         (WebCore::webkitAnimationShorthand): Deleted.
822         (WebCore::webkitBorderAfterShorthand): Deleted.
823         (WebCore::webkitBorderBeforeShorthand): Deleted.
824         (WebCore::webkitBorderEndShorthand): Deleted.
825         (WebCore::webkitBorderStartShorthand): Deleted.
826         (WebCore::webkitColumnsShorthand): Deleted.
827         (WebCore::webkitColumnRuleShorthand): Deleted.
828         (WebCore::flexFlowShorthand): Deleted.
829         (WebCore::flexShorthand): Deleted.
830         (WebCore::webkitMarginCollapseShorthand): Deleted.
831         (WebCore::webkitGridShorthand): Deleted.
832         (WebCore::webkitGridTemplateShorthand): Deleted.
833         (WebCore::webkitGridAreaShorthand): Deleted.
834         (WebCore::webkitGridColumnShorthand): Deleted.
835         (WebCore::webkitGridRowShorthand): Deleted.
836         (WebCore::webkitMarqueeShorthand): Deleted.
837         (WebCore::webkitMaskShorthand): Deleted.
838         (WebCore::webkitMaskPositionShorthand): Deleted.
839         (WebCore::webkitMaskRepeatShorthand): Deleted.
840         (WebCore::webkitTextDecorationShorthand): Deleted.
841         (WebCore::webkitTextEmphasisShorthand): Deleted.
842         (WebCore::webkitTextStrokeShorthand): Deleted.
843         (WebCore::webkitTransitionShorthand): Deleted.
844         (WebCore::webkitPerspectiveOriginShorthand): Deleted.
845         (WebCore::webkitTransformOriginShorthand): Deleted.
846         * css/StylePropertyShorthand.h:
847         * css/makeprop.pl:
848
849 2015-01-16  Commit Queue  <commit-queue@webkit.org>
850
851         Unreviewed, rolling out r178532.
852         https://bugs.webkit.org/show_bug.cgi?id=140548
853
854         Broke fast/css/parsing-css-lang.html on some bots (Requested
855         by ap on #webkit).
856
857         Reverted changeset:
858
859         "Canonicalization of :lang() should preserve the :lang()'s
860         arguments representations"
861         https://bugs.webkit.org/show_bug.cgi?id=139928
862         http://trac.webkit.org/changeset/178532
863
864 2015-01-16  Commit Queue  <commit-queue@webkit.org>
865
866         Unreviewed, rolling out r178577.
867         https://bugs.webkit.org/show_bug.cgi?id=140546
868
869         Broke fast/css-grid-layout/grid-content-sized-columns-
870         resolution.html (Requested by ap on #webkit).
871
872         Reverted changeset:
873
874         "[CSS Grid Layout] Tracks shrink sometimes with indefinite
875         remaining space"
876         https://bugs.webkit.org/show_bug.cgi?id=139059
877         http://trac.webkit.org/changeset/178577
878
879 2015-01-16  Andreas Kling  <akling@apple.com>
880
881         Some improvements to RuleSet shrinking.
882         <https://webkit.org/b/140534>
883
884         Reviewed by Antti Koivisto.
885
886         Give an inline capacity (1) to the RuleData Vectors in RuleSet.
887         The vast majority of Vectors have only a single entry, and this
888         avoids having to allocate a separate Vector backing store for them.
889
890         Also make sure to shrink some Vectors that we weren't already,
891         like those in RuleFeatureSet.
892
893         * css/ElementRuleCollector.cpp:
894         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
895         * css/ElementRuleCollector.h:
896         * css/RuleFeature.cpp:
897         (WebCore::RuleFeatureSet::shrinkToFit):
898         * css/RuleFeature.h:
899         * css/RuleSet.cpp:
900         (WebCore::RuleSet::addToRuleSet):
901         (WebCore::rulesCountForName):
902         (WebCore::shrinkMapVectorsToFit):
903         (WebCore::RuleSet::shrinkToFit):
904         * css/RuleSet.h:
905         (WebCore::RuleSet::idRules):
906         (WebCore::RuleSet::classRules):
907         (WebCore::RuleSet::tagRules):
908         (WebCore::RuleSet::shadowPseudoElementRules):
909         (WebCore::RuleSet::linkPseudoClassRules):
910         (WebCore::RuleSet::cuePseudoRules):
911         (WebCore::RuleSet::focusPseudoClassRules):
912         (WebCore::RuleSet::universalRules):
913
914 2015-01-16  Antti Koivisto  <antti@apple.com>
915
916         Correct naming for FontCascade implementation files
917         https://bugs.webkit.org/show_bug.cgi?id=140544
918
919         Reviewed by Zalan Bujtas.
920
921         Also reduce their number.
922
923         Merge FontFastPath.cpp into FontCascade.cpp
924         Merge FontMac.mm and FontComplexTextMac.cpp into FontCascadeCocoa.mm
925
926         * CMakeLists.txt:
927         * WebCore.vcxproj/WebCore.vcxproj:
928         * WebCore.xcodeproj/project.pbxproj:
929         * platform/graphics/FontCascade.cpp:
930         (WebCore::FontCascade::getEmphasisMarkGlyphData):
931         (WebCore::FontCascade::emphasisMarkAscent):
932         (WebCore::FontCascade::emphasisMarkDescent):
933         (WebCore::FontCascade::emphasisMarkHeight):
934         (WebCore::FontCascade::getGlyphsAndAdvancesForSimpleText):
935         (WebCore::FontCascade::drawSimpleText):
936         (WebCore::FontCascade::drawEmphasisMarksForSimpleText):
937         (WebCore::FontCascade::drawGlyphBuffer):
938         (WebCore::offsetToMiddleOfGlyph):
939         (WebCore::offsetToMiddleOfGlyphAtIndex):
940         (WebCore::FontCascade::drawEmphasisMarks):
941         (WebCore::FontCascade::floatWidthForSimpleText):
942         (WebCore::FontCascade::adjustSelectionRectForSimpleText):
943         (WebCore::FontCascade::offsetForPositionForSimpleText):
944         * platform/graphics/FontFastPath.cpp: Removed.
945         * platform/graphics/cocoa/FontCascadeCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
946         (WebCore::FontCascade::drawGlyphs):
947         (WebCore::FontCascade::adjustSelectionRectForComplexText):
948         (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
949         (WebCore::FontCascade::drawComplexText):
950         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
951         (WebCore::FontCascade::floatWidthForComplexText):
952         (WebCore::FontCascade::offsetForPositionForComplexText):
953         (WebCore::FontCascade::fontDataForCombiningCharacterSequence):
954         * platform/graphics/mac/FontComplexTextMac.cpp: Removed.
955         * platform/graphics/mac/FontMac.mm: Removed.
956
957 2014-11-26  Sergio Villar Senin  <svillar@igalia.com>
958
959         [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
960         https://bugs.webkit.org/show_bug.cgi?id=139059
961
962         Reviewed by David Hyatt.
963
964         Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
965
966         * rendering/RenderGrid.cpp:
967         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
968
969 2015-01-15  Csaba Osztrogonác  <ossy@webkit.org>
970
971         Remove ENABLE(SQL_DATABASE) guards
972         https://bugs.webkit.org/show_bug.cgi?id=140434
973
974         Reviewed by Darin Adler.
975
976         * Configurations/FeatureDefines.xcconfig:
977         * Modules/webdatabase/AbstractDatabaseServer.h:
978         * Modules/webdatabase/ChangeVersionData.h:
979         * Modules/webdatabase/ChangeVersionWrapper.cpp:
980         * Modules/webdatabase/ChangeVersionWrapper.h:
981         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
982         * Modules/webdatabase/DOMWindowWebDatabase.h:
983         * Modules/webdatabase/DOMWindowWebDatabase.idl:
984         * Modules/webdatabase/Database.cpp:
985         * Modules/webdatabase/Database.h:
986         * Modules/webdatabase/Database.idl:
987         * Modules/webdatabase/DatabaseBackend.cpp:
988         * Modules/webdatabase/DatabaseBackend.h:
989         * Modules/webdatabase/DatabaseBackendBase.cpp:
990         * Modules/webdatabase/DatabaseBackendBase.h:
991         * Modules/webdatabase/DatabaseBasicTypes.h:
992         * Modules/webdatabase/DatabaseCallback.h:
993         * Modules/webdatabase/DatabaseCallback.idl:
994         * Modules/webdatabase/DatabaseContext.cpp:
995         * Modules/webdatabase/DatabaseContext.h:
996         * Modules/webdatabase/DatabaseDetails.h:
997         * Modules/webdatabase/DatabaseError.h:
998         * Modules/webdatabase/DatabaseManager.cpp:
999         * Modules/webdatabase/DatabaseManager.h:
1000         * Modules/webdatabase/DatabaseManagerClient.h:
1001         * Modules/webdatabase/DatabaseServer.cpp:
1002         * Modules/webdatabase/DatabaseServer.h:
1003         * Modules/webdatabase/DatabaseTask.cpp:
1004         * Modules/webdatabase/DatabaseTask.h:
1005         * Modules/webdatabase/DatabaseThread.cpp:
1006         * Modules/webdatabase/DatabaseThread.h:
1007         * Modules/webdatabase/DatabaseTracker.cpp:
1008         * Modules/webdatabase/DatabaseTracker.h:
1009         * Modules/webdatabase/OriginLock.cpp:
1010         * Modules/webdatabase/OriginLock.h:
1011         * Modules/webdatabase/SQLCallbackWrapper.h:
1012         * Modules/webdatabase/SQLError.h:
1013         * Modules/webdatabase/SQLError.idl:
1014         * Modules/webdatabase/SQLException.cpp:
1015         * Modules/webdatabase/SQLException.h:
1016         * Modules/webdatabase/SQLException.idl:
1017         * Modules/webdatabase/SQLResultSet.cpp:
1018         * Modules/webdatabase/SQLResultSet.h:
1019         * Modules/webdatabase/SQLResultSet.idl:
1020         * Modules/webdatabase/SQLResultSetRowList.cpp:
1021         * Modules/webdatabase/SQLResultSetRowList.h:
1022         * Modules/webdatabase/SQLResultSetRowList.idl:
1023         * Modules/webdatabase/SQLStatement.cpp:
1024         * Modules/webdatabase/SQLStatement.h:
1025         * Modules/webdatabase/SQLStatementBackend.cpp:
1026         * Modules/webdatabase/SQLStatementBackend.h:
1027         * Modules/webdatabase/SQLStatementCallback.h:
1028         * Modules/webdatabase/SQLStatementCallback.idl:
1029         * Modules/webdatabase/SQLStatementErrorCallback.h:
1030         * Modules/webdatabase/SQLStatementErrorCallback.idl:
1031         * Modules/webdatabase/SQLTransaction.cpp:
1032         * Modules/webdatabase/SQLTransaction.h:
1033         * Modules/webdatabase/SQLTransaction.idl:
1034         * Modules/webdatabase/SQLTransactionBackend.cpp:
1035         * Modules/webdatabase/SQLTransactionBackend.h:
1036         * Modules/webdatabase/SQLTransactionCallback.h:
1037         * Modules/webdatabase/SQLTransactionCallback.idl:
1038         * Modules/webdatabase/SQLTransactionClient.cpp:
1039         * Modules/webdatabase/SQLTransactionClient.h:
1040         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1041         * Modules/webdatabase/SQLTransactionCoordinator.h:
1042         * Modules/webdatabase/SQLTransactionErrorCallback.h:
1043         * Modules/webdatabase/SQLTransactionErrorCallback.idl:
1044         * Modules/webdatabase/SQLTransactionState.h:
1045         * Modules/webdatabase/SQLTransactionStateMachine.cpp:
1046         * Modules/webdatabase/SQLTransactionStateMachine.h:
1047         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1048         (WebCore::JSCommandLineAPIHost::databaseId):
1049         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1050         * bindings/js/JSExceptionBase.cpp:
1051         (WebCore::toExceptionBase):
1052         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1053         * bindings/js/JSSQLTransactionCustom.cpp:
1054         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1055         (webkit_dom_test_callback_finalize):
1056         (webkit_dom_test_callback_constructor):
1057         (webkit_dom_test_callback_callback_with_no_param):
1058         (webkit_dom_test_callback_callback_with_array_param):
1059         (webkit_dom_test_callback_callback_with_serialized_script_value_param):
1060         (webkit_dom_test_callback_callback_with_non_bool_return_type):
1061         (webkit_dom_test_callback_callback_with_string_list):
1062         (webkit_dom_test_callback_callback_with_boolean):
1063         (webkit_dom_test_callback_callback_requires_this_to_pass):
1064         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
1065         * bindings/scripts/test/JS/JSTestCallback.cpp:
1066         * bindings/scripts/test/JS/JSTestCallback.h:
1067         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1068         * bindings/scripts/test/TestCallback.idl:
1069         * dom/DOMExceptions.in:
1070         * dom/ScriptExecutionContext.cpp:
1071         (WebCore::ScriptExecutionContext::setDatabaseContext):
1072         * dom/ScriptExecutionContext.h:
1073         * history/PageCache.cpp:
1074         (WebCore::logCanCacheFrameDecision):
1075         (WebCore::PageCache::canCachePageContainingThisFrame):
1076         * inspector/CommandLineAPIHost.cpp:
1077         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
1078         (WebCore::CommandLineAPIHost::disconnect):
1079         (WebCore::CommandLineAPIHost::databaseIdImpl):
1080         * inspector/CommandLineAPIHost.h:
1081         (WebCore::CommandLineAPIHost::init):
1082         * inspector/InspectorController.cpp:
1083         (WebCore::InspectorController::InspectorController):
1084         * inspector/InspectorDatabaseAgent.cpp:
1085         * inspector/InspectorDatabaseAgent.h:
1086         * inspector/InspectorDatabaseInstrumentation.h:
1087         (WebCore::InspectorInstrumentation::didOpenDatabase):
1088         * inspector/InspectorDatabaseResource.cpp:
1089         * inspector/InspectorDatabaseResource.h:
1090         * inspector/InspectorInstrumentation.cpp:
1091         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1092         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
1093         * inspector/InspectorInstrumentation.h:
1094         * inspector/InstrumentingAgents.cpp:
1095         (WebCore::InstrumentingAgents::InstrumentingAgents):
1096         (WebCore::InstrumentingAgents::reset):
1097         * inspector/InstrumentingAgents.h:
1098         * inspector/WorkerInspectorController.cpp:
1099         (WebCore::WorkerInspectorController::WorkerInspectorController):
1100         * loader/EmptyClients.h:
1101         * loader/FrameLoader.cpp:
1102         (WebCore::FrameLoader::stopLoading):
1103         * page/ChromeClient.h:
1104         * platform/FeatureCounterKeys.h:
1105
1106 2015-01-15  Zalan Bujtas  <zalan@apple.com>
1107
1108         Element appears correctly but does not receive event with a large translation.
1109         https://bugs.webkit.org/show_bug.cgi?id=139815
1110
1111         Reviewed by Simon Fraser.
1112
1113         When the hit point gets translated beyond the min/max value of LayoutRect (infiniteRect()),
1114         we fail to find the corresponding layer.
1115         When there's no clipping on a layer, we use min/max values to represent infiniteness.
1116         However it does not work well across types. With IntPoint(hittest) we can address a point that's outside
1117         of LayoutRect's boundary(clipping).
1118         This patch addresses the immediate issue of not being able to hittest transformed layers properly. 
1119         Fixing the representation of infiniteness is tracked here: webkit.org/b/140533
1120
1121         Test: transforms/hittest-translated-content-off-to-infinity-and-back.html
1122
1123         * rendering/ClipRect.cpp:
1124         (WebCore::ClipRect::intersects):
1125
1126 2015-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
1127
1128         tables/mozilla/bugs/bug10633.html is flakey on Yosemite
1129         https://bugs.webkit.org/show_bug.cgi?id=140487
1130
1131         Reviewed by Simon Fraser.
1132
1133         The workaround in https://bugs.webkit.org/show_bug.cgi?id=140253 works
1134         on both OSes.
1135
1136         * platform/graphics/mac/SimpleFontDataMac.mm:
1137         (WebCore::SimpleFontData::platformInit):
1138
1139 2015-01-15  Ryosuke Niwa  <rniwa@webkit.org>
1140
1141         Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged
1142         https://bugs.webkit.org/show_bug.cgi?id=140523
1143         <rdar://problem/19464329>
1144
1145         Reviewed by Chris Dumez.
1146
1147         The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to
1148         unset selfOrAncestorHasDirAutoAttribute flag while removing a child element.
1149
1150         Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since
1151         we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0".
1152
1153         See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp.
1154
1155         * html/HTMLElement.cpp:
1156         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
1157
1158 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
1159
1160         RenderLayerCompositor: Strange comparison of opacity (float) to boolean.
1161         https://bugs.webkit.org/show_bug.cgi?id=140477.
1162
1163         Reviewed by Simon Fraser.
1164
1165         * rendering/RenderLayerCompositor.cpp:
1166         (WebCore::styleChangeRequiresLayerRebuild): Add a cast to make the meaning of this
1167         code clearer.
1168
1169 2015-01-15  Joseph Pecoraro  <pecoraro@apple.com>
1170
1171         Unreviewed, rolling out r178531.
1172
1173         Caused LayoutTest ASSERTs/CRASHs on Debug Yosemite build-bot.
1174
1175         Reverted changeset:
1176
1177         "Layers need to be already updated before we call adjustViewSize."
1178         https://bugs.webkit.org/show_bug.cgi?id=135514
1179         http://trac.webkit.org/changeset/178531
1180
1181         * page/FrameView.cpp:
1182         (WebCore::FrameView::layout):
1183         (WebCore::FrameView::updateCompositingLayersAfterScrolling):
1184         (WebCore::FrameView::paintContents):
1185         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
1186         * page/FrameView.h:
1187         * platform/ScrollView.cpp:
1188         (WebCore::ScrollView::scrollTo):
1189         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Deleted.
1190         * platform/ScrollView.h:
1191         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
1192
1193 2015-01-15  Chris Dumez  <cdumez@apple.com>
1194
1195         [WK2] Wire diagnostic logging messages through the UIProcess
1196         https://bugs.webkit.org/show_bug.cgi?id=140486
1197
1198         Reviewed by Sam Weinig.
1199
1200         Wire diagnostic logging messages through the UIProcess.
1201         Eventually, the corresponding bundle API should go away.
1202
1203         * WebCore.vcxproj/WebCore.vcxproj:
1204         * WebCore.vcxproj/WebCore.vcxproj.filters:
1205         Add page/DiagnosticLoggingResultType.h to Windows project.
1206
1207         * WebCore.xcodeproj/project.pbxproj:
1208         Add page/DiagnosticLoggingResultType.h to XCode project.
1209
1210         * html/HTMLMediaElement.cpp:
1211         * loader/EmptyClients.h:
1212         * loader/FrameLoader.cpp:
1213         * page/DiagnosticLoggingClient.h:
1214         * page/DiagnosticLoggingResultType.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
1215         Use new DiagnosticLoggingResultType enum instead of old
1216         DiagnosticLoggingClient::LogType one.
1217
1218 2015-01-15  Zalan Bujtas  <zalan@apple.com>
1219
1220         Reduce LayoutRect::infiniteRect() usage.
1221         https://bugs.webkit.org/show_bug.cgi?id=140511
1222
1223         Reviewed by Simon Fraser.
1224
1225         This is in preparation to get rid of LayoutRect/FloatRect::infiniteRect().
1226
1227         No change in functionality.
1228
1229         * platform/graphics/LayoutRect.h:
1230         (WebCore::LayoutRect::isInfinite):
1231         * rendering/ClipRect.h:
1232         (WebCore::ClipRect::reset):
1233         (WebCore::ClipRect::isEmpty):
1234         (WebCore::ClipRect::isInfinite):
1235         (WebCore::ClipRect::setRect): Deleted.
1236         * rendering/PaintInfo.h:
1237         (WebCore::PaintInfo::applyTransform):
1238         * rendering/RenderLayer.cpp:
1239         (WebCore::RenderLayer::calculateClipRects):
1240         * rendering/RenderLayer.h:
1241         (WebCore::ClipRects::reset):
1242         * rendering/RenderLayerBacking.cpp:
1243         (WebCore::RenderLayerBacking::updateGeometry):
1244         * rendering/RenderLayerCompositor.cpp:
1245         (WebCore::RenderLayerCompositor::clippedByAncestor):
1246
1247 2015-01-15  Chris Dumez  <cdumez@apple.com>
1248
1249         Intermittent WebCore build failures - CSSPropertyNames.gperf: No keywords in input file! calling gperf failed: 256 at WebCore/css/makeprop.pl line 901
1250         https://bugs.webkit.org/show_bug.cgi?id=140521
1251
1252         Reviewed by Alexey Proskuryakov.
1253
1254         Close the CSSPropertyNames.gperf file before calling gperf on it
1255         to make sure the content we wrote was flushed. This was causing
1256         intermittent build failures.
1257
1258         * css/makeprop.pl:
1259
1260 2015-01-15  Zalan Bujtas  <zalan@apple.com>
1261
1262         LayerFragment should be able to intersect with ClipRect.
1263         https://bugs.webkit.org/show_bug.cgi?id=140498
1264
1265         Reviewed by Simon Fraser.
1266
1267         No change in functionality.
1268
1269         * rendering/LayerFragment.h:
1270         (WebCore::LayerFragment::intersect):
1271         * rendering/RenderLayer.cpp:
1272         (WebCore::RenderLayer::collectFragments):
1273
1274 2015-01-15  Zalan Bujtas  <zalan@apple.com>
1275
1276         Move ClipRects and ClipRectsCache classes to RenderLayer.cpp.
1277         https://bugs.webkit.org/show_bug.cgi?id=140461
1278
1279         Reviewed by Simon Fraser.
1280
1281         Move classes only used by RenderLayer to RenderLayer.cpp.
1282
1283         No change in functionality.
1284
1285         * rendering/RenderLayer.cpp:
1286         (WebCore::ClipRects::create):
1287         (WebCore::ClipRects::reset):
1288         (WebCore::ClipRects::overflowClipRect):
1289         (WebCore::ClipRects::setOverflowClipRect):
1290         (WebCore::ClipRects::fixedClipRect):
1291         (WebCore::ClipRects::setFixedClipRect):
1292         (WebCore::ClipRects::posClipRect):
1293         (WebCore::ClipRects::setPosClipRect):
1294         (WebCore::ClipRects::fixed):
1295         (WebCore::ClipRects::setFixed):
1296         (WebCore::ClipRects::ref):
1297         (WebCore::ClipRects::deref):
1298         (WebCore::ClipRects::operator==):
1299         (WebCore::ClipRects::operator=):
1300         (WebCore::ClipRects::ClipRects):
1301         (WebCore::ClipRectsCache::ClipRectsCache):
1302         (WebCore::ClipRectsCache::getClipRects):
1303         (WebCore::ClipRectsCache::setClipRects):
1304         (WebCore::ClipRectsCache::getIndex):
1305         (WebCore::RenderLayer::clipRects):
1306         (WebCore::RenderLayer::calculateClipRects):
1307         * rendering/RenderLayer.h:
1308         (WebCore::ClipRects::create): Deleted.
1309         (WebCore::ClipRects::ClipRects): Deleted.
1310         (WebCore::ClipRects::reset): Deleted.
1311         (WebCore::ClipRects::overflowClipRect): Deleted.
1312         (WebCore::ClipRects::setOverflowClipRect): Deleted.
1313         (WebCore::ClipRects::fixedClipRect): Deleted.
1314         (WebCore::ClipRects::setFixedClipRect): Deleted.
1315         (WebCore::ClipRects::posClipRect): Deleted.
1316         (WebCore::ClipRects::setPosClipRect): Deleted.
1317         (WebCore::ClipRects::fixed): Deleted.
1318         (WebCore::ClipRects::setFixed): Deleted.
1319         (WebCore::ClipRects::ref): Deleted.
1320         (WebCore::ClipRects::deref): Deleted.
1321         (WebCore::ClipRects::operator==): Deleted.
1322         (WebCore::ClipRects::operator=): Deleted.
1323         (WebCore::ClipRectsCache::ClipRectsCache): Deleted.
1324         (WebCore::ClipRectsCache::getClipRects): Deleted.
1325         (WebCore::ClipRectsCache::setClipRects): Deleted.
1326         (WebCore::ClipRectsCache::getIndex): Deleted.
1327
1328 2015-01-15  Dhi Aurrahman  <diorahman@rockybars.com>
1329
1330         Canonicalization of :lang() should preserve the :lang()'s arguments representations
1331         https://bugs.webkit.org/show_bug.cgi?id=139928
1332
1333         Reviewed by Benjamin Poulain.
1334
1335         Preserve the representation of IDENT and STRING when serializing the 
1336         :lang(). For example, :lang(foo,"bar"   ,baz) should be serialized as 
1337         :lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
1338
1339         Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
1340         and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
1341         CSSSelector::setLangArgumentList and CSSSelector::langArgumentList 
1342         respectively, since those methods are being exclusively used in respect
1343         with :lang().
1344
1345         Update the test of serializing :lang() with IDENT and STRING arguments.
1346
1347         * css/CSSGrammar.y.in:
1348         * css/CSSParserValues.cpp:
1349         (WebCore::CSSParserSelector::setLangArgumentList):
1350         (WebCore::CSSParserSelector::setArgumentList): Deleted.
1351         * css/CSSParserValues.h:
1352         (WebCore::CSSParserString::init):
1353         (WebCore::CSSParserString::clear):
1354         (WebCore::CSSParserString::isParsedFromString):
1355         (WebCore::CSSParserString::setParsedFromString):
1356         * css/CSSSelector.cpp:
1357         (WebCore::appendLangArgumentList):
1358         (WebCore::CSSSelector::selectorText):
1359         (WebCore::CSSSelector::setLangArgumentList):
1360         (WebCore::appendArgumentList): Deleted.
1361         (WebCore::CSSSelector::setArgumentList): Deleted.
1362         * css/CSSSelector.h:
1363         (WebCore::CSSSelector::langArgumentList):
1364         (WebCore::CSSSelector::langArgumentParsedFromStringFlagList):
1365         (WebCore::CSSSelector::argumentList): Deleted.
1366         * css/SelectorChecker.cpp:
1367         (WebCore::SelectorChecker::checkOne):
1368
1369 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
1370
1371         Layers need to be already updated before we call adjustViewSize
1372         https://bugs.webkit.org/show_bug.cgi?id=135514
1373
1374         Reviewed by Simon Fraser.
1375
1376         Tested by 'fast/dynamic/layer-no-longer-paginated.html'
1377
1378         Defer updating scrollbars until we have finished layout. This
1379         has a couple of benefits:
1380         (1) We do not attempt to modify render layers during layout.
1381         (2) In WK1 we do not attempt to paint during layout.
1382
1383         Add a new virtual predicate to ScrollView indicating when we are in
1384         layout so that calls to setContentsSize do not attempt
1385         to adjust scrollbars.
1386
1387         Modify FrameView to set its ScrollView state to block drawing
1388         scrollbar updates during layout. Also add a post-layout
1389         handler to complete the scrollbar updates after layout is
1390         finished.
1391
1392         * page/FrameView.cpp:
1393         (WebCore::FrameView::layout):
1394         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
1395         * page/FrameView.h:
1396         * platform/ScrollView.cpp:
1397         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
1398         (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
1399         the scroll delta and apply it after the layout is complete.
1400         * platform/ScrollView.h:
1401         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
1402
1403 2015-01-15  Benjamin Poulain  <benjamin@webkit.org>
1404
1405         When building the NFA of the global disjunction, share the prefix subgraph of existing subpatterns
1406         https://bugs.webkit.org/show_bug.cgi?id=140465
1407
1408         Reviewed by Andreas Kling.
1409
1410         This patch updates the parser to produce smaller graphs when multiple patterns
1411         of the rule list share a common prefix.
1412
1413         Previously, GraphBuilder would generate subgraph in place of each parsed
1414         atom. We now only create subgraph if an atom does not appear in the prefix tree.
1415
1416         We accumulate the parsing information into small uint16_t named TrivialAtom.
1417         When generating the subgraph for an new atom, we first check if the prefix tree already
1418         has a corresponding subgraph for that atom. If it does, we do not generate anything and we extend the existing
1419         graph. If there is no existing prefix, we create the subgraph and extend the prefix tree.
1420
1421         Sharing prefix subtrees slows down the subtree generation a bit but the resulting graph is much
1422         simpler for many kind of inputs.
1423
1424         * WebCore.xcodeproj/project.pbxproj:
1425         * contentextensions/ContentExtensionsBackend.cpp:
1426         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
1427         The URLFilterParser now maintains states (the prefix tree) between patterns.
1428
1429         * contentextensions/DFA.cpp:
1430         (WebCore::ContentExtensions::DFA::debugPrintDot):
1431         * contentextensions/DFANode.h:
1432         Fix a typo :)
1433
1434         * contentextensions/NFA.cpp:
1435         (WebCore::ContentExtensions::NFA::createNode):
1436         (WebCore::ContentExtensions::NFA::setFinal):
1437         (WebCore::ContentExtensions::NFA::restoreToGraphSize):
1438         (WebCore::ContentExtensions::NFA::addRuleId):
1439         (WebCore::ContentExtensions::NFA::debugPrintDot):
1440         * contentextensions/NFA.h:
1441         (WebCore::ContentExtensions::NFA::addRuleId):
1442         * contentextensions/NFANode.cpp: Removed.
1443         * contentextensions/NFANode.h:
1444         NFA nodes from two patterns are now "merged" by construction, thus we need
1445         to keep track of multiple rules per node.
1446
1447         * contentextensions/NFAToDFA.cpp:
1448         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
1449         * contentextensions/URLFilterParser.cpp:
1450         (WebCore::ContentExtensions::trivialAtomFromAsciiCharacter):
1451         (WebCore::ContentExtensions::quantifyTrivialAtom):
1452         (WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin):
1453         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
1454         (WebCore::ContentExtensions::GraphBuilder::m_LastPrefixTreeEntry):
1455         (WebCore::ContentExtensions::GraphBuilder::finalize):
1456         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
1457         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
1458         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
1459         (WebCore::ContentExtensions::GraphBuilder::fail):
1460         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
1461         (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
1462         (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):
1463         (WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
1464         (WebCore::ContentExtensions::URLFilterParser::addPattern):
1465         (WebCore::ContentExtensions::GraphBuilder::m_lastAtom): Deleted.
1466         (WebCore::ContentExtensions::URLFilterParser::parse): Deleted.
1467         * contentextensions/URLFilterParser.h:
1468         (WebCore::ContentExtensions::URLFilterParser::hasError): Deleted.
1469         (WebCore::ContentExtensions::URLFilterParser::errorMessage): Deleted.
1470
1471 2015-01-14  Alexey Proskuryakov  <ap@apple.com>
1472
1473         Web Inspector and regular console use different source code locations for messages
1474         https://bugs.webkit.org/show_bug.cgi?id=140478
1475
1476         Reviewed by Brian Burg.
1477
1478         We now create a ConsoleMessage object in a place where we can look at it and use
1479         the source location it computed in a client call.
1480
1481         * inspector/InspectorConsoleInstrumentation.h:
1482         (WebCore::InspectorInstrumentation::addMessageToConsole):
1483         * inspector/InspectorInstrumentation.cpp:
1484         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
1485         * inspector/InspectorInstrumentation.h:
1486         * inspector/WebConsoleAgent.cpp:
1487         (WebCore::WebConsoleAgent::didFinishXHRLoading):
1488         (WebCore::WebConsoleAgent::didReceiveResponse):
1489         (WebCore::WebConsoleAgent::didFailLoading):
1490         * page/PageConsoleClient.cpp:
1491         (WebCore::PageConsoleClient::addMessage):
1492         (WebCore::PageConsoleClient::messageWithTypeAndLevel):
1493         * workers/WorkerGlobalScope.cpp:
1494         (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
1495
1496 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
1497
1498         [Win] Unreviewed Windows build fix.
1499
1500         More missing Font->FontCascade changes.
1501
1502         * platform/win/WebCoreTextRenderer.cpp:
1503         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
1504         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
1505
1506 2015-01-15  Antti Koivisto  <antti@apple.com>
1507
1508         REGRESSION(r178133): Membuster regressed ~4%
1509         https://bugs.webkit.org/show_bug.cgi?id=140495
1510
1511         Reviewed by Andreas Kling.
1512
1513         * platform/graphics/FontCache.cpp:
1514         (WebCore::FontCache::purgeInactiveFontData):
1515
1516             Fonts may ref other fonts. Keep clearing until there are no changes.
1517
1518 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
1519
1520         [Win] Unreviewed build fix.
1521
1522         * platform/graphics/win/FontCacheWin.cpp:
1523         * platform/win/DragImageWin.cpp:
1524         * platform/win/WebCoreTextRenderer.h:
1525
1526 2015-01-15  Antti Koivisto  <antti@apple.com>
1527
1528         Try to fix windows build.
1529
1530         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1531         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1532         (PlatformCALayerWinInternal::displayCallback):
1533         * platform/win/DragImageWin.cpp:
1534         (WebCore::dragLabelFont):
1535         (WebCore::createDragImageForLink):
1536         * platform/win/PopupMenuWin.cpp:
1537         (WebCore::PopupMenuWin::calculatePositionAndSize):
1538         (WebCore::PopupMenuWin::paint):
1539         * platform/win/WebCoreTextRenderer.cpp:
1540         (WebCore::doDrawTextAtPoint):
1541         (WebCore::WebCoreDrawDoubledTextAtPoint):
1542         (WebCore::WebCoreTextFloatWidth):
1543         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
1544         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
1545         * rendering/RenderThemeSafari.cpp:
1546         (WebCore::RenderThemeSafari::setFontFromControlSize):
1547
1548 2015-01-15  Antti Koivisto  <antti@apple.com>
1549
1550         Unreviewed, rolling out r178518.
1551
1552         Didn't mean to commit some of this
1553
1554         Reverted changeset:
1555
1556         "Try to fix windows build."
1557         http://trac.webkit.org/changeset/178518
1558
1559 2015-01-15  Antti Koivisto  <antti@apple.com>
1560
1561         Try to fix windows build.
1562
1563         * platform/graphics/Font.cpp: Copied from Source/WebCore/platform/graphics/SimpleFontData.cpp.
1564         * platform/graphics/Font.h: Copied from Source/WebCore/platform/graphics/SimpleFontData.h.
1565         * platform/graphics/FontCascadeFastPath.cpp: Copied from Source/WebCore/platform/graphics/FontFastPath.cpp.
1566         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1567         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1568         (PlatformCALayerWinInternal::displayCallback):
1569         * platform/graphics/ios/FontIOS.mm: Copied from Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm.
1570         * platform/graphics/mac/FontCascadeComplexTextMac.cpp: Copied from Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp.
1571         * platform/graphics/mac/FontCascadeMac.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
1572         * platform/graphics/mac/FontCoreText.cpp: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp.
1573         * platform/graphics/mac/FontMac.mm: Replaced with Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
1574         * platform/win/DragImageWin.cpp:
1575         (WebCore::dragLabelFont):
1576         (WebCore::createDragImageForLink):
1577         * platform/win/PopupMenuWin.cpp:
1578         (WebCore::PopupMenuWin::calculatePositionAndSize):
1579         (WebCore::PopupMenuWin::paint):
1580         * platform/win/WebCoreTextRenderer.cpp:
1581         (WebCore::doDrawTextAtPoint):
1582         (WebCore::WebCoreDrawDoubledTextAtPoint):
1583         (WebCore::WebCoreTextFloatWidth):
1584         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
1585         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
1586         * rendering/RenderThemeSafari.cpp:
1587         (WebCore::RenderThemeSafari::setFontFromControlSize):
1588
1589 2015-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
1590
1591         http/tests/misc/acid3.html is flakey on Mavericks
1592         https://bugs.webkit.org/show_bug.cgi?id=140253
1593
1594         Reviewed by Alexey Proskuryakov.
1595
1596         CoreText has a bug <rdar://problem/19433490> in which kerning is not applied for a font
1597         if a CTTypesetter is created using that font before a call to CTFontTransformGlyphs. We
1598         often create typesetters in the complex code path, so it's not obvious when this bug
1599         might present itself. This patch simply makes a dummy invocation of
1600         CTFontTransformGlyphs() when creating a SimpleFontData.
1601
1602         No new tests because this is covered by http/tests/misc/acid3.html.
1603
1604         * platform/graphics/mac/SimpleFontDataMac.mm:
1605         (WebCore::SimpleFontData::platformInit):
1606
1607 2015-01-15  Chris Dumez  <cdumez@apple.com>
1608
1609         Get rid of custom StyleBuilder code for 'line-height' CSS property
1610         https://bugs.webkit.org/show_bug.cgi?id=140462
1611
1612         Reviewed by Antti Koivisto.
1613
1614         Get rid of custom StyleBuilder code for 'line-height' CSS property by
1615         using a conditional converter.
1616
1617         * css/CSSPropertyNames.in:
1618         * css/StyleBuilderConverter.h:
1619         (WebCore::StyleBuilderConverter::convertLineHeight):
1620         * css/StyleBuilderCustom.h:
1621         (WebCore::StyleBuilderCustom::applyValueLineHeight):
1622         (WebCore::StyleBuilderCustom::convertLineHeight): Deleted.
1623
1624 2015-01-15  Antti Koivisto  <antti@apple.com>
1625
1626         Rename Font to FontCascade
1627         https://bugs.webkit.org/show_bug.cgi?id=140442
1628
1629         Reviewed by Darin Adler.
1630
1631         We can then rename SimpleFontData to Font. This will match the usual definition of a "font".
1632
1633 2015-01-15  Mihnea Ovidenie  <mihnea@adobe.com>
1634
1635         [CSSRegions] Assert failure in RenderBlock::locateFlowThreadContainingBlock when showing the render tree debug info
1636         https://bugs.webkit.org/show_bug.cgi?id=140441
1637
1638         Reviewed by Andrei Bucur.
1639
1640         When showing the render tree debug information for an element inside a flow thread,
1641         we will display the region range information for all the render boxes. To avoid
1642         computation of flow thread containing block in these situations, we will use
1643         only the cached flow thread containing block information.
1644
1645         No new tests as this code path is only touched when using showRenderTree* methods.
1646
1647         * rendering/RenderObject.cpp:
1648         (WebCore::flowThreadContainingBlockFromRenderer):
1649         (WebCore::RenderObject::showRegionsInformation):
1650
1651 2015-01-14  Simon Fraser  <simon.fraser@apple.com>
1652
1653         Graphics corruption after Find on some pages
1654         https://bugs.webkit.org/show_bug.cgi?id=140489
1655
1656         Reviewed by Zalan Bujtas.
1657         
1658         After doing a Find on http://shop.outlier.cc/shop/retail/chino.html,
1659         garbage could appear on some parts of the page. This is caused by creating
1660         a compositing layer which is marked as opaque, yet failing to paint the entire
1661         layer contents.
1662         
1663         This was caused by a bug in RenderBox::computeBackgroundIsKnownToBeObscured()
1664         logic. On the page in question, doing a Find could cause overflow:hidden sections
1665         to get scrolled (since Find can reveal the selection by scrolling overflow).
1666         However, the render tree walking under RenderBox::foregroundIsKnownToBeOpaqueInRect()
1667         fails to take overflow scrolling into account, so gives the wrong answer
1668         in some content configurations. As a result, we'd think that the background
1669         is obscured, and never paint it.
1670         
1671         Conservative fix is to have isCandidateForOpaquenessTest() return false
1672         when the content has any non-zero scroll offset.
1673
1674         Tests: compositing/contents-opaque/opaque-with-scrolled.html
1675                fast/backgrounds/opaque-scrolled-paint-background.html
1676
1677         * rendering/RenderBox.cpp:
1678         (WebCore::isCandidateForOpaquenessTest):
1679
1680 2015-01-14  Jer Noble  <jer.noble@apple.com>
1681
1682         [Mac][MSE] Stalled YouTube playback does not allow display to sleep.
1683         https://bugs.webkit.org/show_bug.cgi?id=140468
1684         rdar://problem/19171162
1685
1686         Reviewed by Eric Carlson.
1687
1688         Test: media/media-source/media-source-stalled-holds-sleep-assertion.html
1689
1690         The unstated convention of MediaPlayerPrivate::paused() is that implementations should 
1691         return 'true' if the playback rate is 0. However, MediaPlayerPrivateMediaSourceAVFObjC
1692         was returning 'false' if it was supposed to be playing, regardless of the actual rate.
1693         This caused a check in HTMLMediaElement of whether to release the sleep assertion token
1694         to fail, thinking the media engine was still playing.
1695
1696         Add some testing infrastructure to allow us to test whether the media element is disabling
1697         display sleep from within layout tests.
1698
1699         * html/HTMLMediaElement.h:
1700         (WebCore::HTMLMediaElement::isDisablingSleep):
1701         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1702         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
1703         * testing/Internals.cpp:
1704         (WebCore::Internals::elementIsBlockingDisplaySleep):
1705         * testing/Internals.h:
1706         * testing/Internals.idl:
1707
1708 2015-01-14  Zalan Bujtas  <zalan@apple.com>
1709
1710         Move LayoutFragment and ClipRect to their own files.
1711         https://bugs.webkit.org/show_bug.cgi?id=140457
1712
1713         Reviewed by Simon Fraser.
1714
1715         Move these classes to their own files to to make RenderLayer.h less heavy.
1716
1717         No change in functionality.
1718
1719         * WebCore.xcodeproj/project.pbxproj:
1720         * rendering/ClipRect.cpp: Added.
1721         (WebCore::ClipRect::intersects):
1722         * rendering/ClipRect.h: Added.
1723         (WebCore::ClipRect::ClipRect):
1724         (WebCore::ClipRect::rect):
1725         (WebCore::ClipRect::setRect):
1726         (WebCore::ClipRect::affectedByRadius):
1727         (WebCore::ClipRect::setAffectedByRadius):
1728         (WebCore::ClipRect::operator==):
1729         (WebCore::ClipRect::operator!=):
1730         (WebCore::ClipRect::intersect):
1731         (WebCore::ClipRect::move):
1732         (WebCore::ClipRect::moveBy):
1733         (WebCore::ClipRect::isEmpty):
1734         (WebCore::ClipRect::intersects):
1735         (WebCore::ClipRect::inflateX):
1736         (WebCore::ClipRect::inflateY):
1737         (WebCore::ClipRect::inflate):
1738         (WebCore::intersection):
1739         * rendering/LayerFragment.h: Added.
1740         (WebCore::LayerFragment::setRects):
1741         (WebCore::LayerFragment::moveBy):
1742         (WebCore::LayerFragment::intersect):
1743         * rendering/RenderFlowThread.h:
1744         * rendering/RenderLayer.cpp:
1745         (WebCore::ClipRect::intersects): Deleted.
1746         * rendering/RenderLayer.h:
1747         (WebCore::ClipRect::ClipRect): Deleted.
1748         (WebCore::ClipRect::rect): Deleted.
1749         (WebCore::ClipRect::setRect): Deleted.
1750         (WebCore::ClipRect::affectedByRadius): Deleted.
1751         (WebCore::ClipRect::setAffectedByRadius): Deleted.
1752         (WebCore::ClipRect::operator==): Deleted.
1753         (WebCore::ClipRect::operator!=): Deleted.
1754         (WebCore::ClipRect::intersect): Deleted.
1755         (WebCore::ClipRect::move): Deleted.
1756         (WebCore::ClipRect::moveBy): Deleted.
1757         (WebCore::ClipRect::isEmpty): Deleted.
1758         (WebCore::ClipRect::intersects): Deleted.
1759         (WebCore::ClipRect::inflateX): Deleted.
1760         (WebCore::ClipRect::inflateY): Deleted.
1761         (WebCore::ClipRect::inflate): Deleted.
1762         (WebCore::intersection): Deleted.
1763         (WebCore::LayerFragment::LayerFragment): Deleted.
1764         (WebCore::LayerFragment::setRects): Deleted.
1765         (WebCore::LayerFragment::moveBy): Deleted.
1766         (WebCore::LayerFragment::intersect): Deleted.
1767         * rendering/RenderMultiColumnSet.h:
1768         * rendering/RenderRegion.h:
1769         * rendering/RenderTreeAsText.cpp:
1770
1771 2015-01-14  Commit Queue  <commit-queue@webkit.org>
1772
1773         Unreviewed, rolling out r178438.
1774         https://bugs.webkit.org/show_bug.cgi?id=140484
1775
1776         Broke a few MediaSource tests (Requested by JoePeck on
1777         #webkit).
1778
1779         Reverted changeset:
1780
1781         "[MSE] Implement per TrackBuffer buffered."
1782         https://bugs.webkit.org/show_bug.cgi?id=139813
1783         http://trac.webkit.org/changeset/178438
1784
1785 2015-01-14  Enrica Casucci  <enrica@apple.com>
1786
1787         REGRESSION (r165385): Crash when applying autocorrection exceeds maximum text area length.
1788         https://bugs.webkit.org/show_bug.cgi?id=137902
1789         rdar://problem/18568864
1790
1791         Reviewed by Darin Adler.
1792
1793         Test: editing/text-iterator/invalid-subrange.html
1794
1795         characterSubrange should check the iterator position after each advance.
1796         This changed adds a new method to the Internals object to be able to test this.
1797
1798         * editing/TextIterator.cpp:
1799         (WebCore::characterSubrange):
1800         (WebCore::TextIterator::subrange):
1801         (WebCore::findPlainText):
1802         * testing/Internals.cpp:
1803         (WebCore::Internals::subrange):
1804         * testing/Internals.h:
1805         * testing/Internals.idl:
1806
1807 2015-01-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
1808
1809         REGRESSION (r154769): Wrong <title> taken as a tooltip for SVG element.
1810         https://bugs.webkit.org/show_bug.cgi?id=139690.
1811
1812         Reviewed by Daniel Bates.
1813
1814         Before r154769, we were calling Traversal<SVGTitleElement>::firstWithin(), which returns
1815         the first immediate SVGTitleElement child. In r154769, Traversal<SVGTitleElement>::firstWithin()
1816         was replaced by descendantsOfType<SVGTitleElement> which returns all descendants SVGTitleElements.
1817         Then we were returning the first element of these descendants, which may not be an immediate
1818         child of the element, as the title of the SVGElement. This was the reason of this bug. The
1819         fix is to use childrenOfType<SVGTitleElement>() instead, which returns the immediate SVGTitleElement
1820         children of an SVGElement.
1821
1822         Also we were not following exactly the specs for the rootmost SVG element's title value.
1823         According to the W3C specs, for stand-alone SVG documents only, the rootmost SVG element
1824         should not return a title. But we were not returning a title for the rootmost SVG element
1825         always. The fix is to return a empty title for the rootmost SVG element only if topDocument()
1826         of the element isSVGDocument().
1827         
1828         NOTE: The main SVG specs http://www.w3.org/TR/SVG/interact.html#hit-testing (W3C Recommendation
1829         16 August 2011) and http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements (W3C
1830         Recommendation 16 August 2011) do not say how the tooltip of an SVG element is calculated. But
1831         the SVG tiny specs http://www.w3.org/TR/SVGTiny12/struct.html#uiTitleDescBehavior (W3C
1832         Recommendation 22 December 2008) however explains well the tooltip calculation for the embedded
1833         and the stand-alone SVG cases. And it seems this what we should rely on.
1834
1835         Test: svg/hittest/svg-standalone-tooltip.svg
1836               svg/hittest/svg-embedded-tooltip.html
1837
1838         * WebCore.exp.in:
1839         * rendering/HitTestResult.h:
1840         Make HitTestResult::setInnerNode be WEBCORE_EXPORT
1841         
1842         * svg/SVGElement.cpp:
1843         (WebCore::SVGElement::title):
1844         Replace descendantsOfType<SVGTitleElement>() by childrenOfType<SVGTitleElement>().
1845         Fix the title value of the rootmost SVG element.
1846         
1847         * testing/Internals.cpp:
1848         (WebCore::Internals::toolTipFromElement):
1849         * testing/Internals.h:
1850         * testing/Internals.idl:
1851         Add a new internal function toolTipFromElement() which returns the tooltip text for a
1852         given element.
1853
1854 2015-01-14  Csaba Osztrogonác  <ossy@webkit.org>
1855
1856         Buildfix after r178434
1857         https://bugs.webkit.org/show_bug.cgi?id=140467
1858
1859         Reviewed by Chris Dumez.
1860
1861         * css/StyleBuilderConverter.h:
1862         (WebCore::StyleBuilderConverter::convertPerspective):
1863
1864 2015-01-14  Benjamin Poulain  <bpoulain@apple.com>
1865
1866         Build fix for NFAToDFA on ARM
1867
1868         * contentextensions/NFAToDFA.cpp:
1869         (WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
1870         (WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
1871
1872 2015-01-14  Bartlomiej Gajda  <b.gajda@samsung.com>
1873
1874         [MSE] Implement per TrackBuffer buffered.
1875         https://bugs.webkit.org/show_bug.cgi?id=139813.
1876
1877         Reviewed by Jer Noble.
1878
1879         Added implementation of SourceBuffer buffered() algorithm as per specification,
1880         and caching mechanism called when samples are added, removed, or MediaSource
1881         readyState is changed.
1882
1883         Tests: media/media-source/media-source-multiple-trackBuffers-buffered-in-ended-state.html
1884                media/media-source/media-source-multiple-trackBuffers-buffered.html
1885
1886         * Modules/mediasource/MediaSource.cpp:
1887         (WebCore::MediaSource::setReadyState):
1888         * Modules/mediasource/SourceBuffer.cpp:
1889         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
1890         (WebCore::SourceBuffer::SourceBuffer):
1891         (WebCore::SourceBuffer::buffered):
1892         (WebCore::SourceBuffer::invalidateBuffered):
1893         (WebCore::SourceBuffer::recalculateBuffered):
1894         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
1895         (WebCore::SourceBuffer::removeCodedFrames):
1896         (WebCore::SourceBuffer::evictCodedFrames):
1897         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1898         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
1899         (WebCore::SourceBuffer::hasCurrentTime):
1900         * Modules/mediasource/SourceBuffer.h:
1901
1902 2015-01-14  Benjamin Poulain  <benjamin@webkit.org>
1903
1904         Do not create new set for every sub-operation when converting a NFA to DFA
1905         https://bugs.webkit.org/show_bug.cgi?id=140380
1906
1907         Reviewed by Andreas Kling.
1908
1909         This is the first step toward making the NFA-to-DFA conversion more scalable: instead
1910         of creating new sets for each step of the algorithm, we use two kinds of sets
1911         and never do any copy.
1912
1913         The first new tool to do that is UniqueNodeIdSetImpl. It represents a set of NFA state corresponding to a DFA
1914         state. It is unique per DFA state.
1915
1916         HashableNodeIdSet is a helper tool storing a UniqueNodeIdSetImpl.
1917
1918         The creation of new sets now goes like this:
1919         1) Get a NodeIdSet for each possible transition.
1920         2) For each transition:
1921            2a) Extend the NodeIdSet in place with its epsilon closure.
1922            2b) Get the UniqueNodeIdSetImpl corresponding to the new set we discovered.
1923            2c) If the UniqueNodeIdSetImpl is new, queue it for processing.
1924
1925         * WebCore.xcodeproj/project.pbxproj:
1926         * contentextensions/ContentExtensionsDebugging.h: Copied from Source/WebCore/contentextensions/DFANode.h.
1927         * contentextensions/ContentExtensionsBackend.cpp:
1928         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
1929         * contentextensions/ContentExtensionsManager.cpp:
1930         (WebCore::ContentExtensions::ExtensionsManager::loadExtension):
1931         Added some logging to inspect more easily what the clients are sending.
1932
1933         * contentextensions/DFA.cpp:
1934         * contentextensions/DFA.h:
1935         * contentextensions/DFANode.h:
1936         * contentextensions/NFA.cpp:
1937         * contentextensions/NFA.h:
1938         * contentextensions/NFAToDFA.cpp:
1939
1940         (WebCore::ContentExtensions::epsilonClosure):
1941         Instead of returning a new HashSet, extend the input HashSet.
1942
1943         (WebCore::ContentExtensions::UniqueNodeIdSetImpl::buffer):
1944         (WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
1945         (WebCore::ContentExtensions::UniqueNodeIdSet::operator=):
1946         (WebCore::ContentExtensions::UniqueNodeIdSet::~UniqueNodeIdSet):
1947         (WebCore::ContentExtensions::UniqueNodeIdSet::operator==):
1948         (WebCore::ContentExtensions::UniqueNodeIdSet::impl):
1949         (WebCore::ContentExtensions::UniqueNodeIdSet::hash):
1950         (WebCore::ContentExtensions::UniqueNodeIdSet::isEmptyValue):
1951         (WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
1952         (WebCore::ContentExtensions::UniqueNodeIdSetHash::hash):
1953         (WebCore::ContentExtensions::UniqueNodeIdSetHash::equal):
1954         UniqueNodeIdSetImpl is a compact representation of a NodeIdSet corresponding to a DFA node.
1955
1956         It is never built directly, it is only built on demand through NodeIdSetToUniqueNodeIdSetTranslator
1957         from a NodeIdSet.
1958
1959         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
1960         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::hash):
1961         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::equal):
1962         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
1963         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::operator[]):
1964         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::size):
1965         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::begin):
1966         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::end):
1967         (WebCore::ContentExtensions::populateTransitionsExcludingEpsilon):
1968         (WebCore::ContentExtensions::NFAToDFA::convert):
1969         (WebCore::ContentExtensions::setTransitionsExcludingEpsilon): Deleted.
1970         (WebCore::ContentExtensions::HashableNodeIdSet::HashableNodeIdSet): Deleted.
1971         (WebCore::ContentExtensions::HashableNodeIdSet::operator=): Deleted.
1972         (WebCore::ContentExtensions::HashableNodeIdSet::isEmptyValue): Deleted.
1973         (WebCore::ContentExtensions::HashableNodeIdSet::isDeletedValue): Deleted.
1974         (WebCore::ContentExtensions::HashableNodeIdSet::nodeIdSet): Deleted.
1975         (WebCore::ContentExtensions::HashableNodeIdSetHash::hash): Deleted.
1976         (WebCore::ContentExtensions::HashableNodeIdSetHash::equal): Deleted.
1977         (WebCore::ContentExtensions::addDFAState): Deleted.
1978
1979 2015-01-14  Chris Dumez  <cdumez@apple.com>
1980
1981         Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
1982         https://bugs.webkit.org/show_bug.cgi?id=140347
1983
1984         Reviewed by Darin Adler.
1985
1986         Make 'TypeName' parameter unnecessary in CSSPropertyNames.in by:
1987         - Removing the static_cast to the destination type in the generated
1988           StyleBuilder code and let compiler implicitly convert the
1989           CSSPrimitiveValue to the setter's argument type.
1990         - Updating conditional converters to return a WTF::Optional<>
1991           instead of returning a boolean and having an output argument
1992           passed by reference. This way, we can use "auto" in the generated
1993           StyleBuilder code to deduce the return type.
1994
1995         * css/CSSPropertyNames.in:
1996         Drop TypeName parameter from all properties as it is no longer needed.
1997
1998         * css/StyleBuilderConverter.h:
1999         (WebCore::StyleBuilderConverter::convertGridTrackSize):
2000         (WebCore::StyleBuilderConverter::convertGridPosition):
2001         (WebCore::StyleBuilderConverter::convertWordSpacing):
2002         (WebCore::StyleBuilderConverter::convertPerspective):
2003         (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
2004         (WebCore::StyleBuilderConverter::convertFilterOperations):
2005         (WebCore::StyleBuilderConverter::convertMaskImageOperations):
2006         Update conditional converters to return an Optional<>.
2007
2008         * css/makeprop.pl:
2009         (generateValueSetter):
2010         Drop support for TypeName, stop using static_cast to destination
2011         type and update the generated code now that the conditional
2012         converters return an Optional.
2013
2014         * platform/efl/RenderThemeEfl.cpp:
2015         (WebCore::RenderThemeEfl::systemFont):
2016         * platform/graphics/Font.cpp:
2017         (WebCore::Font::Font):
2018         * platform/graphics/FontDescription.h:
2019         (WebCore::FontDescription::setIsItalic):
2020         (WebCore::FontDescription::setIsSmallCaps):
2021         (WebCore::FontDescription::setItalic): Deleted.
2022         (WebCore::FontDescription::setSmallCaps): Deleted.
2023         * rendering/RenderThemeGtk.cpp:
2024         (WebCore::RenderThemeGtk::systemFont):
2025         * rendering/RenderThemeIOS.mm:
2026         (WebCore::RenderThemeIOS::systemFont):
2027         * rendering/RenderThemeMac.mm:
2028         (WebCore::RenderThemeMac::systemFont):
2029         * rendering/RenderThemeSafari.cpp:
2030         (WebCore::RenderThemeSafari::systemFont):
2031         * rendering/RenderThemeWin.cpp:
2032         (WebCore::fillFontDescription):
2033         * rendering/mathml/RenderMathMLToken.cpp:
2034         (WebCore::RenderMathMLToken::updateStyle):
2035         Now that we call the RenderStyle setters with a CSSPrimitiveValue
2036         and let it be implicitly converted to the right type, instead of
2037         doing an explicit static_cast, two setters on FontDescription
2038         were ambiguous: setItalic() / setSmallCaps(). Rename the overloads
2039         taking a boolean in argument to setIsItalic() / setIsSmallCaps()
2040         to resolve the ambiguity.
2041
2042 2015-01-14  Jer Noble  <jer.noble@apple.com>
2043
2044         Null-deref crash when seeking immediately before looping.
2045         https://bugs.webkit.org/show_bug.cgi?id=140394
2046
2047         Reviewed by Eric Carlson.
2048
2049         It is possible for finishSeek() to be called when a seek() has caused a pending seek task
2050         to be scheduled, but before that pending seek task is run. In this case, if a seek request
2051         is issued, the existing pending seek task will not be cancelled, which will cause a crash
2052         when the pending seek task is run.
2053
2054         When checking whether an existing seek task needs to be cancelled, check the actual timer,
2055         rather than the m_seeking boolean, so that this case is covered.
2056
2057         Test: media/video-ended-seek-crash.html
2058
2059         * html/HTMLMediaElement.cpp:
2060         (WebCore::HTMLMediaElement::seekWithTolerance):
2061
2062 2015-01-14  Brent Fulgham  <bfulgham@apple.com>
2063
2064         [Win] Layout Test fast/css/crash-on-custom-cursor-when-loading.html is failing
2065         https://bugs.webkit.org/show_bug.cgi?id=140425
2066
2067         Reviewed by Anders Carlsson.
2068
2069         * platform/win/CursorWin.cpp:
2070         (WebCore::createSharedCursor): Return nullptr when operating system
2071         cannot support the requested icon specification.
2072         (WebCore::Cursor::ensurePlatformCursor): Check for 'createSharedCursor'
2073         returning nullptr, and fall back to the default icon construction.
2074
2075 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2076
2077         REGRESSION(r178367): [GStreamer] Several media tests time out after r178367
2078         https://bugs.webkit.org/show_bug.cgi?id=140437
2079
2080         Reviewed by Philippe Normand.
2081
2082         Add implementation for MediaPlayerPrivate::rate() to GStreamer
2083         media backend.
2084
2085         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2086         (WebCore::MediaPlayerPrivateGStreamer::rate):
2087         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2088
2089 2015-01-13  Commit Queue  <commit-queue@webkit.org>
2090
2091         Unreviewed, rolling out r178390, r178392, r178398, r178400,
2092         r178402, and r178410.
2093         https://bugs.webkit.org/show_bug.cgi?id=140431
2094
2095         Way too many failures to skip (Requested by ap_ on #webkit).
2096
2097         Reverted changesets:
2098
2099         "WebGL2: Support webgl2 context creation."
2100         https://bugs.webkit.org/show_bug.cgi?id=126408
2101         http://trac.webkit.org/changeset/178390
2102
2103         "Unreviewed iOS build fix after r178390."
2104         http://trac.webkit.org/changeset/178392
2105
2106         "[Unreviewed] Windows build fix after r178390."
2107         http://trac.webkit.org/changeset/178398
2108
2109         "[Unreviewed] Speculative test fix after r178390."
2110         http://trac.webkit.org/changeset/178400
2111
2112         "[Unreviewed] Skip webgl tests for temporarily."
2113         https://bugs.webkit.org/show_bug.cgi?id=140423
2114         http://trac.webkit.org/changeset/178402
2115
2116         "[EFL] Fix build after r178390"
2117         https://bugs.webkit.org/show_bug.cgi?id=140424
2118         http://trac.webkit.org/changeset/178410
2119
2120 2015-01-13  Hunseop Jeong  <hs85.jeong@samsung.com>
2121
2122         [EFL] Fix build after r178390 
2123         https://bugs.webkit.org/show_bug.cgi?id=140424
2124
2125         Reviewed by Csaba Osztrogonác.
2126
2127         * CMakeLists.txt: 
2128
2129 2015-01-13  Zalan Bujtas  <zalan@apple.com>
2130
2131         Simple line layout: Refactor TextFragment class.
2132         https://bugs.webkit.org/show_bug.cgi?id=140417
2133
2134         Reviewed by Andreas Kling.
2135
2136         Introduce text fragment type and use class member initializers.
2137
2138         No change in functionality.
2139
2140         * rendering/SimpleLineLayout.cpp:
2141         (WebCore::SimpleLineLayout::TextFragment::TextFragment):
2142         (WebCore::SimpleLineLayout::LineState::addUncommitted):
2143         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
2144         (WebCore::SimpleLineLayout::nextFragment):
2145         (WebCore::SimpleLineLayout::createLineRuns):
2146
2147 2015-01-13  Commit Queue  <commit-queue@webkit.org>
2148
2149         Unreviewed, rolling out r178400.
2150         https://bugs.webkit.org/show_bug.cgi?id=140422
2151
2152         Test fix breaks build (Requested by rfong on #webkit).
2153
2154         Reverted changeset:
2155
2156         "[Unreviewed] Speculative test fix after r178390."
2157         http://trac.webkit.org/changeset/178400
2158
2159 2015-01-13  Roger Fong  <roger_fong@apple.com>
2160
2161         [Unreviewed] Speculative test fix after r178390.
2162
2163         * html/canvas/WebGL1RenderingContext.idl:
2164
2165 2015-01-13  Roger Fong  <roger_fong@apple.com>
2166
2167         [Unreviewed] Windows build fix after r178390.
2168
2169         * DerivedSources.cpp:
2170         * WebCore.vcxproj/WebCore.vcxproj:
2171         * WebCore.vcxproj/WebCore.vcxproj.filters:
2172         * bindings/js/JSBindingsAllInOne.cpp:
2173         * html/canvas/WebGLRenderingContextBase.cpp:
2174         (WebCore::WebGLRenderingContextBase::create):
2175
2176 2015-01-13  Joseph Pecoraro  <pecoraro@apple.com>
2177
2178         NSButtonCell leak allocated under WebCore::paintToggleButton
2179         https://bugs.webkit.org/show_bug.cgi?id=137014
2180
2181         Reviewed by Alexey Proskuryakov.
2182
2183         * platform/mac/ThemeMac.mm:
2184         (WebCore::createToggleButtonCell):
2185         Immediately adopt the NSButtonCell allocation.
2186
2187         (WebCore::sharedRadioCell):
2188         (WebCore::sharedCheckboxCell):
2189         Move from the RetainPtr into the static variable.
2190
2191         (WebCore::paintToggleButton):
2192         Use RetainPtr logic to better manage lifetimes.
2193
2194 2015-01-13  Zalan Bujtas  <zalan@apple.com>
2195
2196         Simple line layout: Refactor SimpleLineLayout::nextFragment().
2197         https://bugs.webkit.org/show_bug.cgi?id=140407
2198
2199         Reviewed by Andreas Kling.
2200
2201         Simplify the code by using content specific branches with early returns.
2202
2203         No change in functionality.
2204
2205         * rendering/SimpleLineLayout.cpp:
2206         (WebCore::SimpleLineLayout::nextFragment):
2207
2208 2015-01-13  Chris Dumez  <cdumez@apple.com>
2209
2210         Unreviewed iOS build fix after r178390.
2211
2212         * html/canvas/CanvasRenderingContext2D.cpp:
2213         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2214         m_type is undeclared.
2215
2216         * html/canvas/WebGLContextGroup.h:
2217         Fix bad include.
2218
2219 2015-01-13  Roger Fong  <roger_fong@apple.com>
2220
2221         WebGL2: Support webgl2 context creation.
2222         https://bugs.webkit.org/show_bug.cgi?id=126408
2223         <rdar://problem/15002170>
2224
2225         Reviewed by Dean Jackson.
2226
2227         Tests covered by existing Khronos tests for WebGL 1.0 conformance.
2228
2229         Create a WebGLRenderingContextBase class that extends to a WebGL1RenderingContext and WebGL2RenderingContext.
2230         Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
2231         As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
2232
2233         * CMakeLists.txt:
2234         * DerivedSources.make:
2235         * WebCore.xcodeproj/project.pbxproj:
2236         * bindings/js/JSCanvasRenderingContextCustom.cpp:
2237         (WebCore::toJS):
2238         * bindings/js/JSDocumentCustom.cpp:
2239         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2240         * bindings/js/JSWebGL1RenderingContextCustom.cpp: Copied from Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp.
2241         * bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
2242         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
2243         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
2244         * bindings/js/JSWebGLRenderingContextCustom.cpp: Removed.
2245         * bindings/scripts/CodeGeneratorJS.pm:
2246         (GenerateImplementation):
2247         * html/HTMLCanvasElement.cpp:
2248         (WebCore::HTMLCanvasElement::getContext):
2249         (WebCore::HTMLCanvasElement::is3dType):
2250         (WebCore::HTMLCanvasElement::reset):
2251         (WebCore::HTMLCanvasElement::paint):
2252         (WebCore::HTMLCanvasElement::getImageData):
2253         * html/canvas/ANGLEInstancedArrays.cpp:
2254         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
2255         (WebCore::ANGLEInstancedArrays::supported):
2256         * html/canvas/ANGLEInstancedArrays.h:
2257         * html/canvas/CanvasRenderingContext.h:
2258         (WebCore::CanvasRenderingContext::type):
2259         * html/canvas/CanvasRenderingContext2D.cpp:
2260         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2261         * html/canvas/EXTBlendMinMax.cpp:
2262         (WebCore::EXTBlendMinMax::EXTBlendMinMax):
2263         * html/canvas/EXTBlendMinMax.h:
2264         * html/canvas/EXTFragDepth.cpp:
2265         (WebCore::EXTFragDepth::EXTFragDepth):
2266         * html/canvas/EXTFragDepth.h:
2267         * html/canvas/EXTShaderTextureLOD.cpp:
2268         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
2269         * html/canvas/EXTShaderTextureLOD.h:
2270         * html/canvas/EXTTextureFilterAnisotropic.cpp:
2271         (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
2272         * html/canvas/EXTTextureFilterAnisotropic.h:
2273         * html/canvas/EXTsRGB.cpp:
2274         (WebCore::EXTsRGB::EXTsRGB):
2275         * html/canvas/EXTsRGB.h:
2276         * html/canvas/OESElementIndexUint.cpp:
2277         (WebCore::OESElementIndexUint::OESElementIndexUint):
2278         * html/canvas/OESElementIndexUint.h:
2279         * html/canvas/OESStandardDerivatives.cpp:
2280         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
2281         * html/canvas/OESStandardDerivatives.h:
2282         * html/canvas/OESTextureFloat.cpp:
2283         (WebCore::OESTextureFloat::OESTextureFloat):
2284         * html/canvas/OESTextureFloat.h:
2285         * html/canvas/OESTextureFloatLinear.cpp:
2286         (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
2287         * html/canvas/OESTextureFloatLinear.h:
2288         * html/canvas/OESTextureHalfFloat.cpp:
2289         (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
2290         * html/canvas/OESTextureHalfFloat.h:
2291         * html/canvas/OESTextureHalfFloatLinear.cpp:
2292         (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
2293         * html/canvas/OESTextureHalfFloatLinear.h:
2294         * html/canvas/OESVertexArrayObject.cpp:
2295         (WebCore::OESVertexArrayObject::OESVertexArrayObject):
2296         * html/canvas/OESVertexArrayObject.h:
2297         * html/canvas/WebGL1RenderingContext.cpp: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.cpp.
2298         * html/canvas/WebGL1RenderingContext.h: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.h.
2299         * html/canvas/WebGL1RenderingContext.idl: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.idl.
2300         * html/canvas/WebGL2RenderingContext.cpp: Added.
2301         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
2302         * html/canvas/WebGL2RenderingContext.h: Added.
2303         * html/canvas/WebGL2RenderingContext.idl: Added.
2304         * html/canvas/WebGLBuffer.cpp:
2305         (WebCore::WebGLBuffer::create):
2306         (WebCore::WebGLBuffer::WebGLBuffer):
2307         * html/canvas/WebGLBuffer.h:
2308         * html/canvas/WebGLCompressedTextureATC.cpp:
2309         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
2310         (WebCore::WebGLCompressedTextureATC::supported):
2311         * html/canvas/WebGLCompressedTextureATC.h:
2312         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
2313         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
2314         (WebCore::WebGLCompressedTexturePVRTC::supported):
2315         * html/canvas/WebGLCompressedTexturePVRTC.h:
2316         * html/canvas/WebGLCompressedTextureS3TC.cpp:
2317         (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
2318         (WebCore::WebGLCompressedTextureS3TC::supported):
2319         * html/canvas/WebGLCompressedTextureS3TC.h:
2320         * html/canvas/WebGLContextGroup.cpp:
2321         (WebCore::WebGLContextGroup::getAGraphicsContext3D):
2322         (WebCore::WebGLContextGroup::addContext):
2323         (WebCore::WebGLContextGroup::removeContext):
2324         (WebCore::WebGLContextGroup::loseContextGroup):
2325         * html/canvas/WebGLContextGroup.h:
2326         * html/canvas/WebGLContextObject.cpp:
2327         (WebCore::WebGLContextObject::WebGLContextObject):
2328         * html/canvas/WebGLContextObject.h:
2329         (WebCore::WebGLContextObject::context):
2330         * html/canvas/WebGLDebugRendererInfo.cpp:
2331         (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
2332         * html/canvas/WebGLDebugRendererInfo.h:
2333         * html/canvas/WebGLDebugShaders.cpp:
2334         (WebCore::WebGLDebugShaders::WebGLDebugShaders):
2335         * html/canvas/WebGLDebugShaders.h:
2336         * html/canvas/WebGLDepthTexture.cpp:
2337         (WebCore::WebGLDepthTexture::WebGLDepthTexture):
2338         * html/canvas/WebGLDepthTexture.h:
2339         * html/canvas/WebGLDrawBuffers.cpp:
2340         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
2341         (WebCore::WebGLDrawBuffers::supported):
2342         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
2343         * html/canvas/WebGLDrawBuffers.h:
2344         * html/canvas/WebGLExtension.cpp:
2345         (WebCore::WebGLExtension::WebGLExtension):
2346         * html/canvas/WebGLExtension.h:
2347         (WebCore::WebGLExtension::context):
2348         * html/canvas/WebGLFramebuffer.cpp:
2349         (WebCore::WebGLFramebuffer::create):
2350         (WebCore::WebGLFramebuffer::WebGLFramebuffer):
2351         * html/canvas/WebGLFramebuffer.h:
2352         * html/canvas/WebGLLoseContext.cpp:
2353         (WebCore::WebGLLoseContext::WebGLLoseContext):
2354         (WebCore::WebGLLoseContext::loseContext):
2355         * html/canvas/WebGLLoseContext.h:
2356         * html/canvas/WebGLObject.cpp:
2357         (WebCore::WebGLObject::WebGLObject):
2358         * html/canvas/WebGLObject.h:
2359         * html/canvas/WebGLProgram.cpp:
2360         (WebCore::WebGLProgram::create):
2361         (WebCore::WebGLProgram::WebGLProgram):
2362         * html/canvas/WebGLProgram.h:
2363         * html/canvas/WebGLRenderbuffer.cpp:
2364         (WebCore::WebGLRenderbuffer::create):
2365         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
2366         * html/canvas/WebGLRenderbuffer.h:
2367         * html/canvas/WebGLRenderingContext.cpp: Removed.
2368         * html/canvas/WebGLRenderingContext.h: Removed.
2369         * html/canvas/WebGLRenderingContext.idl: Removed.
2370         * html/canvas/WebGLRenderingContextBase.cpp: Added.
2371         * html/canvas/WebGLRenderingContextBase.h: Added.
2372         * html/canvas/WebGLRenderingContextBase.idl: Added.
2373         * html/canvas/WebGLShader.cpp:
2374         (WebCore::WebGLShader::create):
2375         (WebCore::WebGLShader::WebGLShader):
2376         * html/canvas/WebGLShader.h:
2377         * html/canvas/WebGLSharedObject.cpp:
2378         (WebCore::WebGLSharedObject::WebGLSharedObject):
2379         * html/canvas/WebGLSharedObject.h:
2380         * html/canvas/WebGLTexture.cpp:
2381         (WebCore::WebGLTexture::create):
2382         (WebCore::WebGLTexture::WebGLTexture):
2383         * html/canvas/WebGLTexture.h:
2384         * html/canvas/WebGLVertexArrayObjectOES.cpp:
2385         (WebCore::WebGLVertexArrayObjectOES::create):
2386         (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
2387         * html/canvas/WebGLVertexArrayObjectOES.h:
2388
2389 2015-01-13  Chris Dumez  <cdumez@apple.com>
2390
2391         Unreviewed, fix Mac build after r178388
2392
2393         FontRanges::isEmpty() -> FontRanges::isNull().
2394
2395         * platform/graphics/mac/FontComplexTextMac.cpp:
2396         (WebCore::Font::fontDataForCombiningCharacterSequence):
2397
2398 2015-01-13  Antti Koivisto  <antti@apple.com>
2399
2400         Devirtualize FontData
2401         https://bugs.webkit.org/show_bug.cgi?id=140390
2402
2403         Reviewed by Andreas Kling.
2404
2405         This patch removes the FontData base class and turns SegmentedFontData into a non-virtual FontRanges type.
2406
2407         SimpleFontData remains as is (without the base) and it can be renamed later to something more sensible.
2408
2409         * WebCore.exp.in:
2410         * WebCore.xcodeproj/project.pbxproj:
2411         * css/CSSFontSelector.cpp:
2412         (WebCore::CSSFontSelector::fontRangesForFamily):
2413         (WebCore::CSSFontSelector::fallbackFontDataAt):
2414         (WebCore::CSSFontSelector::getFontData): Deleted.
2415         (WebCore::CSSFontSelector::getFallbackFontData): Deleted.
2416         * css/CSSFontSelector.h:
2417         * css/CSSSegmentedFontFace.cpp:
2418         (WebCore::CSSSegmentedFontFace::pruneTable):
2419         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
2420         (WebCore::CSSSegmentedFontFace::fontRanges):
2421         (WebCore::CSSSegmentedFontFace::loadFont):
2422         (WebCore::CSSSegmentedFontFace::getFontData): Deleted.
2423         * css/CSSSegmentedFontFace.h:
2424         * platform/graphics/Font.h:
2425         (WebCore::Font::fallbackRangesAt):
2426         (WebCore::Font::fontDataAt): Deleted.
2427         * platform/graphics/FontData.cpp: Removed.
2428         * platform/graphics/FontData.h: Removed.
2429         * platform/graphics/FontGlyphs.cpp:
2430         (WebCore::FontGlyphs::FontGlyphs):
2431         (WebCore::FontGlyphs::determinePitch):
2432         (WebCore::FontGlyphs::isLoadingCustomFonts):
2433         (WebCore::realizeNextFallback):
2434         (WebCore::FontGlyphs::realizeFallbackRangesAt):
2435         (WebCore::FontGlyphs::glyphDataForSystemFallback):
2436         (WebCore::FontGlyphs::glyphDataForVariant):
2437         (WebCore::FontGlyphs::glyphDataForNormalVariant):
2438         (WebCore::glyphPageFromFontRanges):
2439         (WebCore::FontGlyphs::glyphDataForCharacter):
2440         (WebCore::realizeNextFamily): Deleted.
2441         (WebCore::FontGlyphs::realizeFontDataAt): Deleted.
2442         (WebCore::glyphPageFromFontData): Deleted.
2443         * platform/graphics/FontGlyphs.h:
2444         (WebCore::FontGlyphs::primarySimpleFontData):
2445         * platform/graphics/FontRanges.cpp: Copied from Source/WebCore/platform/graphics/SegmentedFontData.cpp.
2446         (WebCore::FontRanges::FontRanges):
2447         (WebCore::FontRanges::~FontRanges):
2448         (WebCore::FontRanges::fontDataForCharacter):
2449         (WebCore::FontRanges::fontDataForFirstRange):
2450         (WebCore::FontRanges::isLoading):
2451         (WebCore::SegmentedFontData::SegmentedFontData): Deleted.
2452         (WebCore::SegmentedFontData::~SegmentedFontData): Deleted.
2453         (WebCore::SegmentedFontData::simpleFontDataForCharacter): Deleted.
2454         (WebCore::SegmentedFontData::simpleFontDataForFirstRange): Deleted.
2455         (WebCore::SegmentedFontData::isCustomFont): Deleted.
2456         (WebCore::SegmentedFontData::isLoading): Deleted.
2457         (WebCore::SegmentedFontData::isSegmented): Deleted.
2458         (WebCore::SegmentedFontData::description): Deleted.
2459         * platform/graphics/FontRanges.h: Copied from Source/WebCore/platform/graphics/SegmentedFontData.h.
2460         (WebCore::FontRanges::Range::Range):
2461         (WebCore::FontRanges::Range::from):
2462         (WebCore::FontRanges::Range::to):
2463         (WebCore::FontRanges::Range::fontData):
2464         (WebCore::FontRanges::isEmpty):
2465         (WebCore::FontRanges::appendRange):
2466         (WebCore::FontRanges::size):
2467         (WebCore::FontRanges::rangeAt):
2468         (WebCore::FontDataRange::FontDataRange): Deleted.
2469         (WebCore::FontDataRange::from): Deleted.
2470         (WebCore::FontDataRange::to): Deleted.
2471         (WebCore::FontDataRange::fontData): Deleted.
2472         (WebCore::SegmentedFontData::create): Deleted.
2473         (WebCore::SegmentedFontData::appendRange): Deleted.
2474         (WebCore::SegmentedFontData::numRanges): Deleted.
2475         (WebCore::SegmentedFontData::rangeAt): Deleted.
2476         (isType): Deleted.
2477         * platform/graphics/FontSelector.h:
2478         * platform/graphics/SegmentedFontData.cpp: Removed.
2479         * platform/graphics/SegmentedFontData.h: Removed.
2480         * platform/graphics/SimpleFontData.cpp:
2481         (WebCore::SimpleFontData::simpleFontDataForCharacter): Deleted.
2482         (WebCore::SimpleFontData::simpleFontDataForFirstRange): Deleted.
2483         (WebCore::SimpleFontData::isSegmented): Deleted.
2484         * platform/graphics/SimpleFontData.h:
2485         (WebCore::SimpleFontData::isCustomFont):
2486         (WebCore::SimpleFontData::isLoading):
2487         (isType): Deleted.
2488         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2489         (-[WebCascadeList initWithFont:character:]):
2490         (-[WebCascadeList objectAtIndex:]):
2491         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2492         * platform/graphics/mac/FontComplexTextMac.cpp:
2493         (WebCore::Font::fontDataForCombiningCharacterSequence):
2494
2495 2015-01-13  Dean Jackson  <dino@apple.com>
2496
2497         Filters aren't applied to elements in columns after the first
2498         https://bugs.webkit.org/show_bug.cgi?id=140331
2499
2500         Reviewed by Simon Fraser.
2501
2502         The important bits of this change came from Simon.
2503
2504         Filters and clipping were not taking columns into
2505         account when using their offset rectangles. The fix
2506         is to recalculate the rects if you're in such a
2507         situation.
2508
2509         Tests: fast/multicol/clip-in-columns.html
2510                fast/multicol/filter-in-columns.html
2511
2512         * rendering/RenderLayer.cpp:
2513         (WebCore::RenderLayer::hasFilterThatIsPainting): New method used
2514         to check if we're about to paint a filter.
2515         (WebCore::RenderLayer::setupFilters): Use the new helper if possible.
2516         (WebCore::RenderLayer::paintLayerContents): If we're in columns,
2517         and we either have a clip or a filter, recalculate the offset rectangles.
2518         * rendering/RenderLayer.h:
2519
2520 2015-01-13  Beth Dakin  <bdakin@apple.com>
2521
2522         Should disable immediate actions for iTunes
2523         https://bugs.webkit.org/show_bug.cgi?id=140405
2524         -and corresponding-
2525         rdar://problem/19461358
2526
2527         Reviewed by Tim Horton.
2528
2529         * WebCore.exp.in:
2530
2531 2015-01-13  Anders Carlsson  <andersca@apple.com>
2532
2533         Remove pure virtual functions from DatabaseBackendBase
2534         https://bugs.webkit.org/show_bug.cgi?id=140402
2535
2536         Reviewed by Sam Weinig.
2537
2538         Also change DatabaseBackendBase to Database in a couple of places.
2539
2540         * Modules/webdatabase/DatabaseBackendBase.cpp:
2541         (WebCore::DatabaseBackendBase::closeDatabase):
2542         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
2543         (WebCore::DatabaseBackendBase::performOpenAndVerify):
2544         (WebCore::DatabaseBackendBase::maximumSize):
2545         * Modules/webdatabase/DatabaseBackendBase.h:
2546         * Modules/webdatabase/DatabaseServer.cpp:
2547         (WebCore::DatabaseServer::createDatabase):
2548         * Modules/webdatabase/DatabaseTracker.cpp:
2549         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2550         (WebCore::DatabaseTracker::doneCreatingDatabase):
2551         (WebCore::DatabaseTracker::addOpenDatabase):
2552         (WebCore::DatabaseTracker::removeOpenDatabase):
2553         (WebCore::DatabaseTracker::getOpenDatabases):
2554         (WebCore::DatabaseTracker::deleteDatabaseFile):
2555         * Modules/webdatabase/DatabaseTracker.h:
2556
2557 2015-01-13  Joseph Pecoraro  <pecoraro@apple.com>
2558
2559         Web Inspector: Remove unused ResizeImage and DecodeImageData timeline events
2560         https://bugs.webkit.org/show_bug.cgi?id=140404
2561
2562         Reviewed by Timothy Hatcher.
2563
2564         * inspector/InspectorTimelineAgent.cpp:
2565         (WebCore::toProtocol):
2566         * inspector/InspectorTimelineAgent.h:
2567         * inspector/TimelineRecordFactory.cpp:
2568         (WebCore::TimelineRecordFactory::createDecodeImageData): Deleted.
2569         (WebCore::TimelineRecordFactory::createResizeImageData): Deleted.
2570         * inspector/TimelineRecordFactory.h:
2571
2572 2015-01-13  Jer Noble  <jer.noble@apple.com>
2573
2574         defaultPlaybackRate not respected when set before source is loaded
2575         https://bugs.webkit.org/show_bug.cgi?id=140282
2576
2577         Reviewed by Eric Carlson.
2578
2579         Test: media/video-defaultplaybackrate-before-load.html
2580
2581         When the HTMLMediaElement is notified that the media player's rate has changed, it asks
2582         for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
2583         from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
2584         1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
2585         value. So the end result is that the value from defaultPlaybackRate is overwritten by
2586         the default value of 1 in MediaPlayer.
2587
2588         Rather than caching the requested rate in MediaPlayer, cache the value reported by
2589         MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback
2590         rate from HTMLMediaElement.playbackRate, just return the last value set. The reported
2591         value is still used for estimating the current time during playback.
2592
2593         Add MediaPlayerPrivate interface method to return the current playback rate.
2594
2595         * html/HTMLMediaElement.cpp:
2596         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedPlaybackRate.
2597         (WebCore::HTMLMediaElement::effectivePlaybackRate): Return m_reportedPlaybackRate.
2598         (WebCore::HTMLMediaElement::requestedPlaybackRate): Return m_playbackRate.
2599         (WebCore::HTMLMediaElement::updatePlaybackRate): Use requestedPlaybackRate() instead
2600             of effectivePlaybackRate();
2601         (WebCore::HTMLMediaElement::ended): Ditto.
2602         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
2603         (WebCore::HTMLMediaElement::endedPlayback): Ditto.
2604         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
2605         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
2606         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): Set m_reportedPlaybackRate.
2607         (WebCore::HTMLMediaElement::mediaPlayerRequestedPlaybackRate): Return
2608             requestedPlaybackRate() if playing and 0 if not.
2609         * html/HTMLMediaElement.h:
2610         * platform/graphics/MediaPlayer.cpp:
2611         (WebCore::MediaPlayer::MediaPlayer): Removed m_rate.
2612         (WebCore::MediaPlayer::rate): Pass to MediaPlayerPrivate.
2613         (WebCore::MediaPlayer::setRate): Do not cache the rate.
2614         (WebCore::MediaPlayer::requestedRate): Added; ask HTMLMediaElement.
2615         * platform/graphics/MediaPlayer.h:
2616         (WebCore::MediaPlayerClient::mediaPlayerRequestedPlaybackRate): Added.
2617         * platform/graphics/MediaPlayerPrivate.h:
2618         (WebCore::MediaPlayerPrivateInterface::rate): Added.
2619         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2620         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2621             Do not cache the requested rate.
2622         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Pass to MediaPlayer.
2623         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Deleted.
2624         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2625         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Deleted.
2626         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2627         (WebCore::MediaPlayerPrivateAVFoundationCF::setRate): Renamed from updateRate.
2628         (WebCore::MediaPlayerPrivateAVFoundationCF::rate): Fetch the rate from the player.
2629         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2630         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2631         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2632         (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Renamed from updateRate.
2633         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate): Fetch the rate from the player.
2634         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2635         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2636         (WebCore::MediaPlayerPrivateQTKit::rate): Fetch the rate from the QTMovie.
2637
2638 2015-01-13  Andreas Kling  <akling@apple.com>
2639
2640         Element::normalizeAttributes() needs to handle arbitrary JS executing between loop iterations.
2641         <https://webkit.org/b/140379>
2642         <rdar://problem/19446901>
2643
2644         Reviewed by Benjamin Poulain.
2645
2646         Since DOM mutation events may arise below the call to Node::normalize(),
2647         have the loop in Element::normalizeAttributes() make a copy of the Attr nodes
2648         beforehand, to guard against mutations.
2649
2650         Based on a patch by Chris "Chris Dumez" Dumez.
2651
2652         Test: fast/dom/Element/normalize-crash2.html
2653
2654         * dom/Element.cpp:
2655         (WebCore::Element::normalizeAttributes):
2656
2657 2015-01-13  Shivakumar JM  <shiva.jm@samsung.com>
2658
2659         Fix Debug Build Error in Webcore module.
2660         https://bugs.webkit.org/show_bug.cgi?id=140383
2661
2662         Reviewed by Csaba Osztrogonác.
2663
2664         No new tests because there is no visible behavior change.
2665
2666         * platform/linux/MemoryPressureHandlerLinux.cpp:
2667         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
2668
2669 2015-01-12  Benjamin Poulain  <benjamin@webkit.org>
2670
2671         Fix a typo in r178313
2672
2673         * contentextensions/URLFilterParser.cpp:
2674         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2675
2676 2015-01-12  Benjamin Poulain  <benjamin@webkit.org>
2677
2678         Add basic pattern matching support to the url filters
2679         https://bugs.webkit.org/show_bug.cgi?id=140283
2680
2681         Reviewed by Andreas Kling.
2682
2683         This patch adds some basic generic pattern support for the url filters
2684         of ContentExtensions.
2685
2686         Instead of writting a new parser, I re-used Gavin's parser for JavaScript
2687         RegExp.
2688
2689         This patch only implements the very basic stuffs: transition on any character
2690         and repetition.
2691
2692         * WebCore.xcodeproj/project.pbxproj:
2693         * contentextensions/ContentExtensionsBackend.cpp:
2694         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2695         Use the new parser.
2696
2697         * contentextensions/DFA.cpp:
2698         (WebCore::ContentExtensions::DFA::DFA):
2699         (WebCore::ContentExtensions::printRange):
2700         (WebCore::ContentExtensions::printTransition):
2701         (WebCore::ContentExtensions::DFA::debugPrintDot):
2702         * contentextensions/NFA.cpp:
2703         (WebCore::ContentExtensions::printRange):
2704         (WebCore::ContentExtensions::printTransition):
2705         (WebCore::ContentExtensions::NFA::debugPrintDot):
2706         The graphs generated with the extended patterns are vastly more complicated
2707         than the old prefix matcher.
2708         I changed the debug output to have a single link between any two nodes
2709         instead of one per transition. This makes the graph a little more manageable.
2710
2711         * contentextensions/NFA.cpp:
2712         (WebCore::ContentExtensions::NFA::addTransition):
2713         (WebCore::ContentExtensions::NFA::addEpsilonTransition):
2714         (WebCore::ContentExtensions::NFA::graphSize):
2715         (WebCore::ContentExtensions::NFA::restoreToGraphSize):
2716         * contentextensions/NFA.h:
2717         * contentextensions/NFANode.h:
2718         (WebCore::ContentExtensions::epsilonClosure):
2719         The new parser can generate transitions back to the root node of index zero.
2720         All the hash structures had to be updated to support this kind of key.
2721
2722         * contentextensions/NFAToDFA.cpp:
2723         (WebCore::ContentExtensions::HashableNodeIdSetHash::hash):
2724         Two tiny improvements:
2725         -Don't hash zero to zero, it causes more conflicts that needed.
2726         -The hash operation must use a commutative operation, otherwise the order
2727          of elements can affect the hash, which is undesired for a set.
2728         I'll improve this further later.
2729
2730         (WebCore::ContentExtensions::NFAToDFA::convert):
2731
2732         * contentextensions/URLFilterParser.cpp: Added.
2733         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
2734         (WebCore::ContentExtensions::GraphBuilder::m_lastAtom):
2735         (WebCore::ContentExtensions::GraphBuilder::finalize):
2736         (WebCore::ContentExtensions::GraphBuilder::errorMessage):
2737         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2738         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
2739         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
2740         (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
2741         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
2742         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
2743         (WebCore::ContentExtensions::GraphBuilder::assertionEOL):
2744         (WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
2745         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
2746         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
2747         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
2748         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassEnd):
2749         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesSubpatternBegin):
2750         (WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
2751         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesEnd):
2752         (WebCore::ContentExtensions::GraphBuilder::disjunction):
2753         (WebCore::ContentExtensions::GraphBuilder::hasError):
2754         (WebCore::ContentExtensions::GraphBuilder::fail):
2755         (WebCore::ContentExtensions::URLFilterParser::parse):
2756         * contentextensions/URLFilterParser.h:
2757         (WebCore::ContentExtensions::URLFilterParser::hasError):
2758         (WebCore::ContentExtensions::URLFilterParser::errorMessage):
2759
2760 2015-01-11  Sam Weinig  <sam@webkit.org>
2761
2762         Remove support for SharedWorkers
2763         https://bugs.webkit.org/show_bug.cgi?id=140344
2764
2765         Reviewed by Anders Carlsson.
2766
2767         * CMakeLists.txt:
2768         * Configurations/FeatureDefines.xcconfig:
2769         * DerivedSources.cpp:
2770         * DerivedSources.make:
2771         * PlatformGTK.cmake:
2772         * PlatformMac.cmake:
2773         * WebCore.vcxproj/WebCore.vcxproj:
2774         * WebCore.vcxproj/WebCore.vcxproj.filters:
2775         * WebCore.xcodeproj/project.pbxproj:
2776         * bindings/generic/RuntimeEnabledFeatures.cpp:
2777         (WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled): Deleted.
2778         * bindings/generic/RuntimeEnabledFeatures.h:
2779         * bindings/js/JSBindingsAllInOne.cpp:
2780         * bindings/js/JSDOMWindowCustom.cpp:
2781         * bindings/js/JSSharedWorkerCustom.cpp: Removed.
2782         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2783         (WebCore::toJSWorkerGlobalScope):
2784         (WebCore::toJSSharedWorkerGlobalScope): Deleted.
2785         * bindings/js/JSWorkerGlobalScopeBase.h:
2786         * bindings/js/WorkerScriptController.cpp:
2787         (WebCore::WorkerScriptController::initScript):
2788         * bindings/scripts/IDLAttributes.txt:
2789         * bindings/scripts/preprocess-idls.pl:
2790         * dom/Document.cpp:
2791         (WebCore::Document::prepareForDestruction):
2792         * dom/EventTarget.h:
2793         * dom/EventTargetFactory.in:
2794         * history/PageCache.cpp:
2795         (WebCore::logCanCacheFrameDecision):
2796         (WebCore::PageCache::canCachePageContainingThisFrame):
2797         * loader/FrameLoader.cpp:
2798         * page/SecurityOrigin.h:
2799         (WebCore::SecurityOrigin::canAccessLocalStorage):
2800         (WebCore::SecurityOrigin::canAccessSharedWorkers): Deleted.
2801         * platform/FeatureCounterKeys.h:
2802         * platform/PlatformStrategies.h:
2803         (WebCore::PlatformStrategies::PlatformStrategies):
2804         (WebCore::PlatformStrategies::sharedWorkerStrategy): Deleted.
2805         * workers/DefaultSharedWorkerRepository.cpp: Removed.
2806         * workers/DefaultSharedWorkerRepository.h: Removed.
2807         * workers/SharedWorker.cpp: Removed.
2808         * workers/SharedWorker.h: Removed.
2809         * workers/SharedWorker.idl: Removed.
2810         * workers/SharedWorkerGlobalScope.cpp: Removed.
2811         * workers/SharedWorkerGlobalScope.h: Removed.
2812         * workers/SharedWorkerGlobalScope.idl: Removed.
2813         * workers/SharedWorkerRepository.cpp: Removed.
2814         * workers/SharedWorkerRepository.h: Removed.
2815         * workers/SharedWorkerStrategy.h: Removed.
2816         * workers/SharedWorkerThread.cpp: Removed.
2817         * workers/SharedWorkerThread.h: Removed.
2818         * workers/WorkerGlobalScope.h:
2819         (WebCore::WorkerGlobalScope::isSharedWorkerGlobalScope): Deleted.
2820
2821 2015-01-12  Byungseon Shin  <sun.shin@lge.com>
2822
2823         REGRESSION(r178029): [GTK][EFL] Caused no-backing-for-clip-overlap test failures
2824         https://bugs.webkit.org/show_bug.cgi?id=140336
2825
2826         Reviewed by Simon Fraser.
2827
2828         Avoid creating childClippingMaskLayer when renderer has not border radius nor clip path.
2829
2830         * rendering/RenderLayerBacking.cpp:
2831         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
2832
2833 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
2834
2835         [Apple] Squelch stderr log regarding negative stroke thickness
2836         https://bugs.webkit.org/show_bug.cgi?id=140372
2837         <rdar://problem/19426485>
2838
2839         Reviewed by Eric Carlson.
2840
2841         No new tests because there is no visible behavior change.
2842
2843         * platform/graphics/cg/GraphicsContextCG.cpp:
2844         (WebCore::GraphicsContext::setPlatformStrokeThickness):
2845
2846 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
2847
2848         Get rid of unnecessary reimplementations of CGFloor/Ceiling
2849         https://bugs.webkit.org/show_bug.cgi?id=140375
2850
2851         Reviewed by Simon Fraser.
2852
2853         * platform/mac/DragImageMac.mm:
2854         (WebCore::widthWithFont):
2855         (WebCore::drawAtPoint):
2856         (WebCore::webkit_CGCeiling): Deleted.
2857         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2858         (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
2859         (webkit_CGFloor): Deleted.
2860         Delete unnecessary code, use the real CGFloor/Ceiling instead.
2861
2862 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
2863
2864         REGRESSION (r177656): Text in find-in-page yellow bouncy rectangle is not crisp
2865         https://bugs.webkit.org/show_bug.cgi?id=140373
2866         <rdar://problem/19447156>
2867
2868         Reviewed by Simon Fraser.
2869
2870         * page/mac/TextIndicatorWindow.mm:
2871         (WebCore::TextIndicatorWindow::setTextIndicator):
2872         Expand the window margin to the nearest integer.
2873         The window was already being pixel-snapped, but then we'd translate by
2874         the non-integral margin when building up the layer tree.
2875         It's OK to do this on 2x because it's fine to have the margin be bigger
2876         than needed.
2877
2878         * platform/spi/cg/CoreGraphicsSPI.h:
2879         Add a CGCeiling to match CGFloor.
2880
2881 2015-01-12  Andreas Kling  <akling@apple.com>
2882
2883         Guard web thread stuff with USE(WEB_THREAD) instead of PLATFORM(IOS).
2884
2885         Dan pointed out that we should guard WebThreadIsLockedOrDisabled() with
2886         USE(WEB_THREAD) to communicate our ambitions to someday have an iOS
2887         build of WebKit that doesn't need any of that.
2888
2889         * Modules/geolocation/Geolocation.cpp:
2890         (WebCore::Geolocation::resume):
2891
2892 2015-01-12  Andreas Kling  <akling@apple.com>
2893
2894         Fix build for non-iOS platforms. :|
2895
2896         * Modules/geolocation/Geolocation.cpp:
2897         (WebCore::Geolocation::resume):
2898
2899 2015-01-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2900
2901         [Freetype] Don't use non-scalable fonts.
2902         https://bugs.webkit.org/show_bug.cgi?id=31931
2903
2904         Reviewed by Martin Robinson.
2905
2906         No new tests needed.
2907
2908         * platform/graphics/freetype/FontCacheFreeType.cpp:
2909         (WebCore::FontCache::createFontPlatformData): Prefer scalable fonts.
2910
2911 2015-01-12  Andreas Kling  <akling@apple.com>
2912
2913         Geolocation objects shouldn't prevent page caching.
2914         <https://webkit.org/b/140369>
2915
2916         Reviewed by Joseph Pecoraro.
2917
2918         Enable the code for suspend/resume of Geolocation objects on all platforms
2919         instead of just iOS. This allows pages using geolocation to use page cache
2920         instead of reloading on back/forward navigation.
2921
2922         Test: fast/history/page-cache-geolocation.html
2923
2924         * Modules/geolocation/Geolocation.cpp:
2925         (WebCore::Geolocation::Geolocation):
2926         (WebCore::Geolocation::resetAllGeolocationPermission):
2927         (WebCore::Geolocation::stop):
2928         (WebCore::Geolocation::setIsAllowed):
2929         (WebCore::Geolocation::positionChanged):
2930         (WebCore::Geolocation::setError):
2931         * Modules/geolocation/Geolocation.h:
2932
2933 2015-01-12  Chris Dumez  <cdumez@apple.com>
2934
2935         Log navigation types using DiagnosticLoggingClient
2936         https://bugs.webkit.org/show_bug.cgi?id=140323
2937
2938         Reviewed by Darin Adler.
2939
2940         Log navigation types using DiagnosticLoggingClient to help us understand
2941         what types of navigations are common and give us an estimate on the
2942         total number of navigations.
2943
2944         * loader/FrameLoader.cpp:
2945         (WebCore::logNavigation):
2946         (WebCore::FrameLoader::loadWithDocumentLoader):
2947         (WebCore::logNavigationWithFeatureCounter): Deleted.
2948         * page/DiagnosticLoggingKeys.cpp:
2949         (WebCore::DiagnosticLoggingKeys::navigationKey):
2950         * page/DiagnosticLoggingKeys.h:
2951
2952 2015-01-12  Brian J. Burg  <burg@cs.washington.edu>
2953
2954         Web Inspector: ASSERT under WebCore::InspectorResourceAgent::loadResource
2955         https://bugs.webkit.org/show_bug.cgi?id=140367
2956
2957         Reviewed by Andreas Kling.
2958
2959         * inspector/InspectorResourceAgent.cpp:
2960         (WebCore::InspectorResourceAgent::loadResource): use copyRef() instead of move(),
2961         since we check the callback after giving it to the loader client.
2962
2963 2015-01-12  Anders Carlsson  <andersca@apple.com>
2964
2965         Move DatabaseBackend functions back to Database
2966         https://bugs.webkit.org/show_bug.cgi?id=140368
2967
2968         Reviewed by Sam Weinig.
2969
2970         * Modules/webdatabase/Database.cpp:
2971         (WebCore::Database::openAndVerifyVersion):
2972         (WebCore::Database::close):
2973         (WebCore::Database::performOpenAndVerify):
2974         (WebCore::Database::scheduleTransaction):
2975         (WebCore::Database::runTransaction):
2976         (WebCore::Database::scheduleTransactionStep):
2977         (WebCore::Database::inProgressTransactionCompleted):
2978         (WebCore::Database::transactionClient):
2979         (WebCore::Database::transactionCoordinator):
2980         * Modules/webdatabase/Database.h:
2981         * Modules/webdatabase/DatabaseBackend.cpp:
2982         (WebCore::DatabaseBackend::openAndVerifyVersion): Deleted.
2983         (WebCore::DatabaseBackend::performOpenAndVerify): Deleted.
2984         (WebCore::DatabaseBackend::close): Deleted.
2985         (WebCore::DatabaseBackend::runTransaction): Deleted.
2986         (WebCore::DatabaseBackend::inProgressTransactionCompleted): Deleted.
2987         (WebCore::DatabaseBackend::scheduleTransaction): Deleted.
2988         (WebCore::DatabaseBackend::scheduleTransactionStep): Deleted.
2989         (WebCore::DatabaseBackend::transactionClient): Deleted.
2990         (WebCore::DatabaseBackend::transactionCoordinator): Deleted.
2991         * Modules/webdatabase/DatabaseBackend.h:
2992         * Modules/webdatabase/DatabaseThread.cpp:
2993         (WebCore::DatabaseThread::recordDatabaseOpen):
2994         (WebCore::DatabaseThread::recordDatabaseClosed):
2995         (WebCore::SameDatabasePredicate::SameDatabasePredicate):
2996         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
2997         * Modules/webdatabase/DatabaseThread.h:
2998         * Modules/webdatabase/SQLTransactionBackend.cpp:
2999         (WebCore::SQLTransactionBackend::create):
3000         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
3001         * Modules/webdatabase/SQLTransactionBackend.h:
3002         (WebCore::SQLTransactionBackend::database):
3003
3004 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
3005
3006         Addressing post-review comment after r178292
3007         https://bugs.webkit.org/show_bug.cgi?id=136769
3008
3009         Unreviewed.
3010
3011         * loader/cache/CachedFont.cpp:
3012         (WebCore::CachedFont::ensureCustomFontData):
3013
3014 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
3015
3016         Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
3017         https://bugs.webkit.org/show_bug.cgi?id=136769
3018
3019         Reviewed by Antti Koivisto.
3020
3021         If ENABLE(SVG_OTF_CONVERTER) is defined, use the converter. It can be defined at the same
3022         time as ENABLE(SVG_FONTS) but, if so, the SVG font code will be dead code.
3023
3024         No new tests because the define is off by default. Tests will come soon, I promise.
3025
3026         * Configurations/FeatureDefines.xcconfig:
3027         * css/CSSFontFaceSource.cpp:
3028         (WebCore::CSSFontFaceSource::getFontData): When creating a font, if the ENABLE is on,
3029         do the transcode and take the non-SVG path.
3030         (WebCore::CSSFontFaceSource::ensureFontData): Pass extra arguments to
3031         CachedFont::ensureCustomFontData()
3032         * css/CSSFontFaceSource.h: For the case of in-document SVG fonts, keep the transcoded
3033         bytes around.
3034         * loader/cache/CachedFont.cpp:
3035         (WebCore::CachedFont::ensureCustomFontData): For out-of-document SVG fonts, do the
3036         transcode if the ENABLE is on, then treat as if the font is any old webfont.
3037         (WebCore::CachedFont::getSVGFontById): This function looks up the relevant <font>
3038         element. Modify it to take a pointer to a (possibly external) document within which
3039         to search.
3040         * loader/cache/CachedFont.h: Extra arguments to CachedFont::ensureCustomFontData()
3041         and CachedFont::getSVGFontById()
3042
3043 2015-01-12  Zan Dobersek  <zdobersek@igalia.com>
3044
3045         Clean up FrameTree::traverseNext() traversals of main frames
3046         https://bugs.webkit.org/show_bug.cgi?id=140338
3047
3048         Reviewed by Andreas Kling.
3049
3050         There's no reason to pass the main frame as the stayWithin parameter
3051         to FrameTree::traverseNext() when traversing over that same main frame.
3052
3053         * inspector/InspectorApplicationCacheAgent.cpp:
3054         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
3055         * inspector/InspectorPageAgent.cpp:
3056         (WebCore::InspectorPageAgent::getCookies):
3057         (WebCore::InspectorPageAgent::deleteCookie):
3058         (WebCore::InspectorPageAgent::searchInResources):
3059         * replay/SerializationMethods.cpp:
3060         (WebCore::frameIndexFromFrame):
3061         (WebCore::frameFromFrameIndex):
3062
3063 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
3064
3065         Multi-rect TextIndicators are vertically flipped in WebKit1
3066         https://bugs.webkit.org/show_bug.cgi?id=140350
3067         <rdar://problem/19441243>
3068
3069         Reviewed by Beth Dakin.
3070
3071         * page/TextIndicator.cpp:
3072         (WebCore::TextIndicator::createWithSelectionInFrame):
3073         (WebCore::TextIndicator::TextIndicator):
3074         * page/TextIndicator.h:
3075         (WebCore::TextIndicator::selectionRectInRootViewCoordinates):
3076         (WebCore::TextIndicator::textBoundingRectInRootViewCoordinates):
3077         (WebCore::TextIndicator::selectionRectInWindowCoordinates): Deleted.
3078         (WebCore::TextIndicator::textBoundingRectInWindowCoordinates): Deleted.
3079         * page/mac/TextIndicatorWindow.mm:
3080         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
3081         (WebCore::TextIndicatorWindow::setTextIndicator):
3082         Compute, store, and use TextIndicator's selectionRect and textBoundingRect
3083         in root view coordinates instead of window coordinates; this way, each
3084         WebKit can do the conversion itself, and the rootView vs. window flipping
3085         isn't wrongly factored into textRectsInBoundingRectCoordinates.
3086
3087 2015-01-12  Commit Queue  <commit-queue@webkit.org>
3088
3089         Unreviewed, rolling out r178281.
3090         https://bugs.webkit.org/show_bug.cgi?id=140366
3091
3092         Broke many media tests (Requested by ap on #webkit).
3093
3094         Reverted changeset:
3095
3096         "defaultPlaybackRate not respected when set before source is
3097         loaded"
3098         https://bugs.webkit.org/show_bug.cgi?id=140282
3099         http://trac.webkit.org/changeset/178281
3100
3101 2015-01-12  Anders Carlsson  <andersca@apple.com>
3102
3103         Merge DatabaseBackendContext into DatabaseContext
3104         https://bugs.webkit.org/show_bug.cgi?id=140365
3105
3106         Reviewed by Antti Koivisto.
3107
3108         * CMakeLists.txt:
3109         * Modules/webdatabase/AbstractDatabaseServer.h:
3110         * Modules/webdatabase/Database.cpp:
3111         (WebCore::Database::Database):
3112         * Modules/webdatabase/Database.h:
3113         * Modules/webdatabase/DatabaseBackend.cpp:
3114         (WebCore::DatabaseBackend::DatabaseBackend):
3115         * Modules/webdatabase/DatabaseBackend.h:
3116         * Modules/webdatabase/DatabaseBackendBase.cpp:
3117         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
3118         * Modules/webdatabase/DatabaseBackendBase.h:
3119         (WebCore::DatabaseBackendBase::databaseContext):
3120         * Modules/webdatabase/DatabaseBackendContext.cpp: Removed.
3121         * Modules/webdatabase/DatabaseBackendContext.h: Removed.
3122         * Modules/webdatabase/DatabaseContext.cpp:
3123         (WebCore::DatabaseContext::securityOrigin):
3124         (WebCore::DatabaseContext::isContextThread):
3125         (WebCore::DatabaseContext::backend): Deleted.
3126         * Modules/webdatabase/DatabaseContext.h:
3127         * Modules/webdatabase/DatabaseManager.cpp:
3128         (WebCore::DatabaseManager::openDatabaseBackend):
3129         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
3130         * Modules/webdatabase/DatabaseServer.cpp:
3131         (WebCore::DatabaseServer::interruptAllDatabasesForContext):
3132         (WebCore::DatabaseServer::openDatabase):
3133         (WebCore::DatabaseServer::createDatabase):
3134         * Modules/webdatabase/DatabaseServer.h:
3135         * Modules/webdatabase/DatabaseTracker.cpp:
3136         (WebCore::DatabaseTracker::canEstablishDatabase):
3137         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
3138         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
3139         * Modules/webdatabase/DatabaseTracker.h:
3140         * Modules/webdatabase/SQLTransactionBackend.cpp:
3141         * Modules/webdatabase/SQLTransactionClient.cpp:
3142         * WebCore.vcxproj/WebCore.vcxproj:
3143         * WebCore.vcxproj/WebCore.vcxproj.filters:
3144         * WebCore.xcodeproj/project.pbxproj:
3145
3146 2015-01-12  Jer Noble  <jer.noble@apple.com>
3147
3148         defaultPlaybackRate not respected when set before source is loaded
3149         https://bugs.webkit.org/show_bug.cgi?id=140282
3150
3151         Reviewed by Eric Carlson.
3152
3153         Test: media/video-defaultplaybackrate-before-load.html
3154
3155         When the HTMLMediaElement is notified that the media player's rate has changed, it asks
3156         for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
3157         from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
3158         1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
3159         value. So the end result is that the value from defaultPlaybackRate is overwritten by
3160         the default value of 1 in MediaPlayer.
3161
3162         Rather than caching the requested rate in MediaPlayer, cache the value reported by
3163         MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback
3164         rate from HTMLMediaElement.playbackRate, just return the last value set. The reported
3165         value is still used for estimating the current time during playback.
3166
3167         Add MediaPlayerPrivate interface method to return the current playback rate.
3168
3169         * html/HTMLMediaElement.cpp:
3170         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedPlaybackRate.
3171         (WebCore::HTMLMediaElement::effectivePlaybackRate): Return m_reportedPlaybackRate.
3172         (WebCore::HTMLMediaElement::requestedPlaybackRate): Return m_playbackRate.
3173         (WebCore::HTMLMediaElement::updatePlaybackRate): Use requestedPlaybackRate() instead
3174             of effectivePlaybackRate();
3175         (WebCore::HTMLMediaElement::ended): Ditto.
3176         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
3177         (WebCore::HTMLMediaElement::endedPlayback): Ditto.
3178         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
3179         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): Set m_reportedPlaybackRate.
3180         (WebCore::HTMLMediaElement::mediaPlayerRequestedPlaybackRate): Return
3181             requestedPlaybackRate() if playing and 0 if not.
3182         * html/HTMLMediaElement.h:
3183         * platform/graphics/MediaPlayer.cpp:
3184         (WebCore::MediaPlayer::MediaPlayer): Removed m_rate.
3185         (WebCore::MediaPlayer::rate): Pass to MediaPlayerPrivate.
3186         (WebCore::MediaPlayer::setRate): Do not cache the rate.
3187         (WebCore::MediaPlayer::requestedRate): Added; ask HTMLMediaElement.
3188         * platform/graphics/MediaPlayer.h:
3189         (WebCore::MediaPlayerClient::mediaPlayerRequestedPlaybackRate): Added.
3190         * platform/graphics/MediaPlayerPrivate.h:
3191         (WebCore::MediaPlayerPrivateInterface::rate): Added.
3192         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3193         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
3194             Do not cache the requested rate.
3195         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Pass to MediaPlayer.
3196         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Deleted.
3197         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3198         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Deleted.
3199         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3200         (WebCore::MediaPlayerPrivateAVFoundationCF::setRate): Renamed from updateRate.
3201         (WebCore::MediaPlayerPrivateAVFoundationCF::rate): Fetch the rate from the player.
3202         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
3203         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3204         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3205         (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Renamed from updateRate.
3206         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate): Fetch the rate from the player.
3207         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3208         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3209         (WebCore::MediaPlayerPrivateQTKit::rate): Fetch the rate from the QTMovie.
3210
3211 2015-01-11  Anders Carlsson  <andersca@apple.com>
3212
3213         Merge DatabaseBase into Database
3214         https://bugs.webkit.org/show_bug.cgi?id=140345
3215
3216         Reviewed by Antti Koivisto.
3217
3218         * CMakeLists.txt:
3219         * Modules/webdatabase/Database.cpp:
3220         (WebCore::Database::Database):
3221         (WebCore::Database::runTransaction):
3222         (WebCore::Database::logErrorMessage):
3223         * Modules/webdatabase/Database.h:
3224         (WebCore::Database::scriptExecutionContext):
3225         * Modules/webdatabase/DatabaseBackendBase.cpp:
3226         * Modules/webdatabase/DatabaseBackendBase.h:
3227         (WebCore::DatabaseBackendBase::setFrontend):
3228         * Modules/webdatabase/DatabaseBase.cpp: Removed.
3229         * Modules/webdatabase/DatabaseBase.h: Removed.
3230         * WebCore.vcxproj/WebCore.vcxproj:
3231         * WebCore.vcxproj/WebCore.vcxproj.filters:
3232         * WebCore.xcodeproj/project.pbxproj:
3233
3234 2015-01-12  Darin Adler  <darin@apple.com>
3235
3236         Modernize and streamline HTMLTokenizer
3237         https://bugs.webkit.org/show_bug.cgi?id=140166
3238
3239         Reviewed by Sam Weinig.
3240
3241         * html/parser/AtomicHTMLToken.h:
3242         (WebCore::AtomicHTMLToken::initializeAttributes): Removed unneeded assertions
3243         based on fields I removed.
3244
3245         * html/parser/HTMLDocumentParser.cpp:
3246         (WebCore::HTMLDocumentParser::HTMLDocumentParser): Change to use updateStateFor
3247         to set the initial state when parsing a fragment, since it implements the same
3248         rule taht the tokenizerStateForContextElement function did.
3249         (WebCore::HTMLDocumentParser::pumpTokenizer): Updated to use the revised
3250         interfaces for HTMLSourceTracker and HTMLTokenizer.
3251         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Changed to take a
3252         TokenPtr instead of an HTMLToken, so we can clear out the TokenPtr earlier
3253         for non-character tokens, and let them get cleared later for character tokens.
3254         (WebCore::HTMLDocumentParser::insert): Pass references.
3255         (WebCore::HTMLDocumentParser::append): Ditto.
3256         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan): Ditto.
3257
3258         * html/parser/HTMLDocumentParser.h: Updated argument type for constructTreeFromHTMLToken
3259         and removed now-unneeded m_token data members.
3260
3261         * html/parser/HTMLEntityParser.cpp: Removed unneeded uses of the inline keyword.
3262         (WebCore::HTMLEntityParser::consumeNamedEntity): Replaced two uses of
3263         advanceAndASSERT with just plain advance; there's really no need to assert the
3264         character is the one we just got out of the string.
3265
3266         * html/parser/HTMLInputStream.h: Moved the include of TextPosition.h here from
3267         its old location since this class has two data members that are OrdinalNumber.
3268
3269         * html/parser/HTMLMetaCharsetParser.cpp:
3270         (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser): Removed most of the
3271         initialization, since it's now done by defaults.
3272         (WebCore::extractCharset): Rewrote this to be a non-member function, and to
3273         use a for loop, and to handle quote marks in a simpler way. Also changed it
3274         to return a StringView so we don't have to allocate a new string.
3275         (WebCore::HTMLMetaCharsetParser::processMeta): Use a modern for loop, and
3276         also take a token argument since it's no longer a data member.
3277         (WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes): Use a modern for
3278         loop, StringView instead of string, and don't bother naming the local enum.
3279         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Updated for the new
3280         way of getting tokens from the tokenizer.
3281
3282         * html/parser/HTMLMetaCharsetParser.h: Got rid of some data members and
3283         tightened up the formatting a little. Don't bother allocating the tokenizer
3284         on the heap.
3285
3286         * html/parser/HTMLPreloadScanner.cpp:
3287         (WebCore::TokenPreloadScanner::TokenPreloadScanner): Removed unneeded
3288         initialization.
3289         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner): Ditto.
3290         (WebCore::HTMLPreloadScanner::scan): Changed to take a reference.
3291
3292         * html/parser/HTMLPreloadScanner.h: Removed unneeded includes, typedefs,
3293         and forward declarations. Removed explicit declaration of the destructor,
3294         since the default one works. Removed unused createCheckpoint and rewindTo
3295         functions. Gave initial values for various data members. Marked the device
3296         scale factor const beacuse it's set in the constructor and never changed.
3297         Also removed the unneeded isSafeToSendToAnotherThread.
3298
3299         * html/parser/HTMLResourcePreloader.cpp:
3300         (WebCore::PreloadRequest::isSafeToSendToAnotherThread): Deleted.
3301
3302         * html/parser/HTMLResourcePreloader.h:
3303         (WebCore::PreloadRequest::PreloadRequest): Removed unneeded calls to
3304         isolatedCopy. Also removed isSafeToSendToAnotherThread.
3305
3306         * html/parser/HTMLSourceTracker.cpp:
3307         (WebCore::HTMLSourceTracker::startToken): Renamed. Changed to keep state
3308          in the source tracker itself, not the token.
3309         (WebCore::HTMLSourceTracker::endToken): Ditto.
3310         (WebCore::HTMLSourceTracker::source): Renamed. Changed to use the state
3311         from the source tracker.
3312
3313         * html/parser/HTMLSourceTracker.h: Removed unneeded include of HTMLToken.h.
3314         Renamed functions, removed now-unneeded comment.
3315
3316         * html/parser/HTMLToken.h: Cut down on the fields used by the source tracker.
3317         It only needs to know the start and end of each attribute, not each part of
3318         each attribute. Removed setBaseOffset, setEndOffset, length, addNewAttribute,
3319         beginAttributeName, endAttributeName, beginAttributeValue, endAttributeValue,
3320         m_baseOffset and m_length. Added beginAttribute and endAttribute.
3321         (WebCore::HTMLToken::clear): No need to zero m_length or m_baseOffset any more.
3322         (WebCore::HTMLToken::length): Deleted.
3323         (WebCore::HTMLToken::setBaseOffset): Deleted.
3324         (WebCore::HTMLToken::setEndOffset): Deleted.
3325         (WebCore::HTMLToken::beginStartTag): Only null out m_currentAttribute if we
3326         are compiling in assertions.
3327         (WebCore::HTMLToken::beginEndTag): Ditto.
3328         (WebCore::HTMLToken::addNewAttribute): Deleted.
3329         (WebCore::HTMLToken::beginAttribute): Moved the code from addNewAttribute in
3330         here and set the start offset.
3331         (WebCore::HTMLToken::beginAttributeName): Deleted.
3332         (WebCore::HTMLToken::endAttributeName): Deleted.
3333         (WebCore::HTMLToken::beginAttributeValue): Deleted.
3334         (WebCore::HTMLToken::endAttributeValue): Deleted.
3335
3336         * html/parser/HTMLTokenizer.cpp:
3337         (WebCore::HTMLToken::endAttribute): Added. Sets the end offset.
3338         (WebCore::HTMLToken::appendToAttributeName): Updated assertion.
3339         (WebCore::HTMLToken::appendToAttributeValue): Ditto.
3340         (WebCore::convertASCIIAlphaToLower): Renamed from toLowerCase and changed
3341         so it's legal to call on lower case letters too.
3342         (WebCore::vectorEqualsString): Changed to take a string literal rather than
3343         a WTF::String.
3344         (WebCore::HTMLTokenizer::inEndTagBufferingState): Made this a member function.
3345         (WebCore::HTMLTokenizer::HTMLTokenizer): Updated for data member changes.
3346         (WebCore::HTMLTokenizer::bufferASCIICharacter): Added. Optimized version of
3347         bufferCharacter for the common case where we know the character is ASCII.
3348         (WebCore::HTMLTokenizer::bufferCharacter): Moved this function here from the
3349         header since it's only used inside the class.
3350         (WebCore::HTMLTokenizer::emitAndResumeInDataState): Moved this here, renamed
3351         it and removed the state argument.
3352         (WebCore::HTMLTokenizer::emitAndReconsumeInDataState): Ditto.
3353         (WebCore::HTMLTokenizer::emitEndOfFile): More of the same.
3354         (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded): Ditto.
3355         (WebCore::HTMLTokenizer::haveBufferedCharacterToken): Ditto.
3356         (WebCore::HTMLTokenizer::flushBufferedEndTag): Updated since m_token is now
3357         the actual token, not just a pointer.
3358         (WebCore::HTMLTokenizer::flushEmitAndResumeInDataState): Renamed this and
3359         removed the state argument.
3360         (WebCore::HTMLTokenizer::processToken): This function, formerly nextToken,
3361         is now the internal function used by nextToken. Updated its contents to use
3362         simpler macros, changed code to set m_state when returning, rather than
3363         constantly setting it when cycling through states, switched style to use
3364         early return/goto rather than lots of else statements, took out unneeded
3365         braces now that BEGIN/END_STATE handles the braces, collapsed upper and
3366         lower case letter handling in many states, changed lookAhead call sites to
3367         use the new advancePast function instead.
3368         (WebCore::HTMLTokenizer::updateStateFor): Set m_state directly instead of
3369         calling a setstate function.
3370         (WebCore::HTMLTokenizer::appendToTemporaryBuffer): Moved here from header.
3371         (WebCore::HTMLTokenizer::temporaryBufferIs): Changed argument type to
3372         a literal instead of a WTF::String.
3373         (WebCore::HTMLTokenizer::appendToPossibleEndTag): Renamed and changed type
3374         to be a UChar instead of LChar, although all characters will be ASCII.
3375         (WebCore::HTMLTokenizer::isAppropriateEndTag): Marked const, and changed
3376         type from size_t to unsigned.
3377
3378         * html/parser/HTMLTokenizer.h: Changed interface of nextToken so it returns
3379         a TokenPtr so code doesn't have to understand special rules about when to
3380         work with an HTMLToken and when to clear it. Made most functions private,
3381         and made the State enum private as well. Replaced the state and setState
3382         functions with more specific functions for the few states we need to deal
3383         with outside the class. Moved function bodies outside the class definition
3384         so it's easier to read the class definition.
3385
3386         * html/parser/HTMLTreeBuilder.cpp:
3387         (WebCore::HTMLTreeBuilder::processStartTagForInBody): Updated to use the
3388         new set state functions instead of setState.
3389         (WebCore::HTMLTreeBuilder::processEndTag): Ditto.
3390         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
3391         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
3392         (WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.
3393
3394         * html/parser/InputStreamPreprocessor.h: Marked the constructor explicit,
3395         and mde it take a reference rather than a pointer.
3396
3397         * html/parser/TextDocumentParser.cpp:
3398         (WebCore::TextDocumentParser::insertFakePreElement): Updated to use the
3399         new set state functions instead of setState.
3400
3401         * html/parser/XSSAuditor.cpp:
3402         (WebCore::XSSAuditor::decodedSnippetForName): Updated for name change.
3403         (WebCore::XSSAuditor::decodedSnippetForAttribute): Updated for changes to
3404         attribute range tracking.
3405         (WebCore::XSSAuditor::decodedSnippetForJavaScript): Updated for name change.
3406         (WebCore::XSSAuditor::isSafeToSendToAnotherThread): Deleted.
3407
3408         * html/parser/XSSAuditor.h: Deleted isSafeToSendToAnotherThread.
3409
3410         * html/track/WebVTTTokenizer.cpp: Removed the local state variable from
3411         WEBVTT_ADVANCE_TO; there is no need for it.
3412         (WebCore::WebVTTTokenizer::WebVTTTokenizer): Use a reference instead of a
3413         pointer for the preprocessor.
3414         (WebCore::WebVTTTokenizer::nextToken): Ditto. Also removed the state local
3415         variable and the switch statement, replacing with labels instead since we
3416         go between states with goto.
3417
3418         * platform/text/SegmentedString.cpp:
3419         (WebCore::SegmentedString::operator=): Changed the return type to be non-const
3420         to match normal C++ design rules.
3421         (WebCore::SegmentedString::pushBack): Renamed from prepend since this is not a
3422         general purpose prepend function. Also fixed assertions to not use the strangely
3423         named "escaped" function, since we are deleting it.
3424         (WebCore::SegmentedString::append): Ditto.
3425         (WebCore::SegmentedString::advancePastNonNewlines): Renamed from advance, since
3426         the function only works for non-newlines.
3427         (WebCore::SegmentedString::currentColumn): Got rid of unneeded local variable.
3428         (WebCore::SegmentedString::advancePastSlowCase): Moved here from header and
3429         renamed. This function now consumes the characters if they match.
3430
3431     &nbs