Fix build for non-iOS platforms. :|
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-01-12  Andreas Kling  <akling@apple.com>
2
3         Fix build for non-iOS platforms. :|
4
5         * Modules/geolocation/Geolocation.cpp:
6         (WebCore::Geolocation::resume):
7
8 2015-01-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
9
10         [Freetype] Don't use non-scalable fonts.
11         https://bugs.webkit.org/show_bug.cgi?id=31931
12
13         Reviewed by Martin Robinson.
14
15         No new tests needed.
16
17         * platform/graphics/freetype/FontCacheFreeType.cpp:
18         (WebCore::FontCache::createFontPlatformData): Prefer scalable fonts.
19
20 2015-01-12  Andreas Kling  <akling@apple.com>
21
22         Geolocation objects shouldn't prevent page caching.
23         <https://webkit.org/b/140369>
24
25         Reviewed by Joseph Pecoraro.
26
27         Enable the code for suspend/resume of Geolocation objects on all platforms
28         instead of just iOS. This allows pages using geolocation to use page cache
29         instead of reloading on back/forward navigation.
30
31         Test: fast/history/page-cache-geolocation.html
32
33         * Modules/geolocation/Geolocation.cpp:
34         (WebCore::Geolocation::Geolocation):
35         (WebCore::Geolocation::resetAllGeolocationPermission):
36         (WebCore::Geolocation::stop):
37         (WebCore::Geolocation::setIsAllowed):
38         (WebCore::Geolocation::positionChanged):
39         (WebCore::Geolocation::setError):
40         * Modules/geolocation/Geolocation.h:
41
42 2015-01-12  Chris Dumez  <cdumez@apple.com>
43
44         Log navigation types using DiagnosticLoggingClient
45         https://bugs.webkit.org/show_bug.cgi?id=140323
46
47         Reviewed by Darin Adler.
48
49         Log navigation types using DiagnosticLoggingClient to help us understand
50         what types of navigations are common and give us an estimate on the
51         total number of navigations.
52
53         * loader/FrameLoader.cpp:
54         (WebCore::logNavigation):
55         (WebCore::FrameLoader::loadWithDocumentLoader):
56         (WebCore::logNavigationWithFeatureCounter): Deleted.
57         * page/DiagnosticLoggingKeys.cpp:
58         (WebCore::DiagnosticLoggingKeys::navigationKey):
59         * page/DiagnosticLoggingKeys.h:
60
61 2015-01-12  Brian J. Burg  <burg@cs.washington.edu>
62
63         Web Inspector: ASSERT under WebCore::InspectorResourceAgent::loadResource
64         https://bugs.webkit.org/show_bug.cgi?id=140367
65
66         Reviewed by Andreas Kling.
67
68         * inspector/InspectorResourceAgent.cpp:
69         (WebCore::InspectorResourceAgent::loadResource): use copyRef() instead of move(),
70         since we check the callback after giving it to the loader client.
71
72 2015-01-12  Anders Carlsson  <andersca@apple.com>
73
74         Move DatabaseBackend functions back to Database
75         https://bugs.webkit.org/show_bug.cgi?id=140368
76
77         Reviewed by Sam Weinig.
78
79         * Modules/webdatabase/Database.cpp:
80         (WebCore::Database::openAndVerifyVersion):
81         (WebCore::Database::close):
82         (WebCore::Database::performOpenAndVerify):
83         (WebCore::Database::scheduleTransaction):
84         (WebCore::Database::runTransaction):
85         (WebCore::Database::scheduleTransactionStep):
86         (WebCore::Database::inProgressTransactionCompleted):
87         (WebCore::Database::transactionClient):
88         (WebCore::Database::transactionCoordinator):
89         * Modules/webdatabase/Database.h:
90         * Modules/webdatabase/DatabaseBackend.cpp:
91         (WebCore::DatabaseBackend::openAndVerifyVersion): Deleted.
92         (WebCore::DatabaseBackend::performOpenAndVerify): Deleted.
93         (WebCore::DatabaseBackend::close): Deleted.
94         (WebCore::DatabaseBackend::runTransaction): Deleted.
95         (WebCore::DatabaseBackend::inProgressTransactionCompleted): Deleted.
96         (WebCore::DatabaseBackend::scheduleTransaction): Deleted.
97         (WebCore::DatabaseBackend::scheduleTransactionStep): Deleted.
98         (WebCore::DatabaseBackend::transactionClient): Deleted.
99         (WebCore::DatabaseBackend::transactionCoordinator): Deleted.
100         * Modules/webdatabase/DatabaseBackend.h:
101         * Modules/webdatabase/DatabaseThread.cpp:
102         (WebCore::DatabaseThread::recordDatabaseOpen):
103         (WebCore::DatabaseThread::recordDatabaseClosed):
104         (WebCore::SameDatabasePredicate::SameDatabasePredicate):
105         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
106         * Modules/webdatabase/DatabaseThread.h:
107         * Modules/webdatabase/SQLTransactionBackend.cpp:
108         (WebCore::SQLTransactionBackend::create):
109         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
110         * Modules/webdatabase/SQLTransactionBackend.h:
111         (WebCore::SQLTransactionBackend::database):
112
113 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
114
115         Addressing post-review comment after r178292
116         https://bugs.webkit.org/show_bug.cgi?id=136769
117
118         Unreviewed.
119
120         * loader/cache/CachedFont.cpp:
121         (WebCore::CachedFont::ensureCustomFontData):
122
123 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
124
125         Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
126         https://bugs.webkit.org/show_bug.cgi?id=136769
127
128         Reviewed by Antti Koivisto.
129
130         If ENABLE(SVG_OTF_CONVERTER) is defined, use the converter. It can be defined at the same
131         time as ENABLE(SVG_FONTS) but, if so, the SVG font code will be dead code.
132
133         No new tests because the define is off by default. Tests will come soon, I promise.
134
135         * Configurations/FeatureDefines.xcconfig:
136         * css/CSSFontFaceSource.cpp:
137         (WebCore::CSSFontFaceSource::getFontData): When creating a font, if the ENABLE is on,
138         do the transcode and take the non-SVG path.
139         (WebCore::CSSFontFaceSource::ensureFontData): Pass extra arguments to
140         CachedFont::ensureCustomFontData()
141         * css/CSSFontFaceSource.h: For the case of in-document SVG fonts, keep the transcoded
142         bytes around.
143         * loader/cache/CachedFont.cpp:
144         (WebCore::CachedFont::ensureCustomFontData): For out-of-document SVG fonts, do the
145         transcode if the ENABLE is on, then treat as if the font is any old webfont.
146         (WebCore::CachedFont::getSVGFontById): This function looks up the relevant <font>
147         element. Modify it to take a pointer to a (possibly external) document within which
148         to search.
149         * loader/cache/CachedFont.h: Extra arguments to CachedFont::ensureCustomFontData()
150         and CachedFont::getSVGFontById()
151
152 2015-01-12  Zan Dobersek  <zdobersek@igalia.com>
153
154         Clean up FrameTree::traverseNext() traversals of main frames
155         https://bugs.webkit.org/show_bug.cgi?id=140338
156
157         Reviewed by Andreas Kling.
158
159         There's no reason to pass the main frame as the stayWithin parameter
160         to FrameTree::traverseNext() when traversing over that same main frame.
161
162         * inspector/InspectorApplicationCacheAgent.cpp:
163         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
164         * inspector/InspectorPageAgent.cpp:
165         (WebCore::InspectorPageAgent::getCookies):
166         (WebCore::InspectorPageAgent::deleteCookie):
167         (WebCore::InspectorPageAgent::searchInResources):
168         * replay/SerializationMethods.cpp:
169         (WebCore::frameIndexFromFrame):
170         (WebCore::frameFromFrameIndex):
171
172 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
173
174         Multi-rect TextIndicators are vertically flipped in WebKit1
175         https://bugs.webkit.org/show_bug.cgi?id=140350
176         <rdar://problem/19441243>
177
178         Reviewed by Beth Dakin.
179
180         * page/TextIndicator.cpp:
181         (WebCore::TextIndicator::createWithSelectionInFrame):
182         (WebCore::TextIndicator::TextIndicator):
183         * page/TextIndicator.h:
184         (WebCore::TextIndicator::selectionRectInRootViewCoordinates):
185         (WebCore::TextIndicator::textBoundingRectInRootViewCoordinates):
186         (WebCore::TextIndicator::selectionRectInWindowCoordinates): Deleted.
187         (WebCore::TextIndicator::textBoundingRectInWindowCoordinates): Deleted.
188         * page/mac/TextIndicatorWindow.mm:
189         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
190         (WebCore::TextIndicatorWindow::setTextIndicator):
191         Compute, store, and use TextIndicator's selectionRect and textBoundingRect
192         in root view coordinates instead of window coordinates; this way, each
193         WebKit can do the conversion itself, and the rootView vs. window flipping
194         isn't wrongly factored into textRectsInBoundingRectCoordinates.
195
196 2015-01-12  Commit Queue  <commit-queue@webkit.org>
197
198         Unreviewed, rolling out r178281.
199         https://bugs.webkit.org/show_bug.cgi?id=140366
200
201         Broke many media tests (Requested by ap on #webkit).
202
203         Reverted changeset:
204
205         "defaultPlaybackRate not respected when set before source is
206         loaded"
207         https://bugs.webkit.org/show_bug.cgi?id=140282
208         http://trac.webkit.org/changeset/178281
209
210 2015-01-12  Anders Carlsson  <andersca@apple.com>
211
212         Merge DatabaseBackendContext into DatabaseContext
213         https://bugs.webkit.org/show_bug.cgi?id=140365
214
215         Reviewed by Antti Koivisto.
216
217         * CMakeLists.txt:
218         * Modules/webdatabase/AbstractDatabaseServer.h:
219         * Modules/webdatabase/Database.cpp:
220         (WebCore::Database::Database):
221         * Modules/webdatabase/Database.h:
222         * Modules/webdatabase/DatabaseBackend.cpp:
223         (WebCore::DatabaseBackend::DatabaseBackend):
224         * Modules/webdatabase/DatabaseBackend.h:
225         * Modules/webdatabase/DatabaseBackendBase.cpp:
226         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
227         * Modules/webdatabase/DatabaseBackendBase.h:
228         (WebCore::DatabaseBackendBase::databaseContext):
229         * Modules/webdatabase/DatabaseBackendContext.cpp: Removed.
230         * Modules/webdatabase/DatabaseBackendContext.h: Removed.
231         * Modules/webdatabase/DatabaseContext.cpp:
232         (WebCore::DatabaseContext::securityOrigin):
233         (WebCore::DatabaseContext::isContextThread):
234         (WebCore::DatabaseContext::backend): Deleted.
235         * Modules/webdatabase/DatabaseContext.h:
236         * Modules/webdatabase/DatabaseManager.cpp:
237         (WebCore::DatabaseManager::openDatabaseBackend):
238         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
239         * Modules/webdatabase/DatabaseServer.cpp:
240         (WebCore::DatabaseServer::interruptAllDatabasesForContext):
241         (WebCore::DatabaseServer::openDatabase):
242         (WebCore::DatabaseServer::createDatabase):
243         * Modules/webdatabase/DatabaseServer.h:
244         * Modules/webdatabase/DatabaseTracker.cpp:
245         (WebCore::DatabaseTracker::canEstablishDatabase):
246         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
247         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
248         * Modules/webdatabase/DatabaseTracker.h:
249         * Modules/webdatabase/SQLTransactionBackend.cpp:
250         * Modules/webdatabase/SQLTransactionClient.cpp:
251         * WebCore.vcxproj/WebCore.vcxproj:
252         * WebCore.vcxproj/WebCore.vcxproj.filters:
253         * WebCore.xcodeproj/project.pbxproj:
254
255 2015-01-12  Jer Noble  <jer.noble@apple.com>
256
257         defaultPlaybackRate not respected when set before source is loaded
258         https://bugs.webkit.org/show_bug.cgi?id=140282
259
260         Reviewed by Eric Carlson.
261
262         Test: media/video-defaultplaybackrate-before-load.html
263
264         When the HTMLMediaElement is notified that the media player's rate has changed, it asks
265         for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
266         from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
267         1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
268         value. So the end result is that the value from defaultPlaybackRate is overwritten by
269         the default value of 1 in MediaPlayer.
270
271         Rather than caching the requested rate in MediaPlayer, cache the value reported by
272         MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback
273         rate from HTMLMediaElement.playbackRate, just return the last value set. The reported
274         value is still used for estimating the current time during playback.
275
276         Add MediaPlayerPrivate interface method to return the current playback rate.
277
278         * html/HTMLMediaElement.cpp:
279         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedPlaybackRate.
280         (WebCore::HTMLMediaElement::effectivePlaybackRate): Return m_reportedPlaybackRate.
281         (WebCore::HTMLMediaElement::requestedPlaybackRate): Return m_playbackRate.
282         (WebCore::HTMLMediaElement::updatePlaybackRate): Use requestedPlaybackRate() instead
283             of effectivePlaybackRate();
284         (WebCore::HTMLMediaElement::ended): Ditto.
285         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
286         (WebCore::HTMLMediaElement::endedPlayback): Ditto.
287         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
288         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): Set m_reportedPlaybackRate.
289         (WebCore::HTMLMediaElement::mediaPlayerRequestedPlaybackRate): Return
290             requestedPlaybackRate() if playing and 0 if not.
291         * html/HTMLMediaElement.h:
292         * platform/graphics/MediaPlayer.cpp:
293         (WebCore::MediaPlayer::MediaPlayer): Removed m_rate.
294         (WebCore::MediaPlayer::rate): Pass to MediaPlayerPrivate.
295         (WebCore::MediaPlayer::setRate): Do not cache the rate.
296         (WebCore::MediaPlayer::requestedRate): Added; ask HTMLMediaElement.
297         * platform/graphics/MediaPlayer.h:
298         (WebCore::MediaPlayerClient::mediaPlayerRequestedPlaybackRate): Added.
299         * platform/graphics/MediaPlayerPrivate.h:
300         (WebCore::MediaPlayerPrivateInterface::rate): Added.
301         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
302         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
303             Do not cache the requested rate.
304         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Pass to MediaPlayer.
305         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Deleted.
306         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
307         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Deleted.
308         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
309         (WebCore::MediaPlayerPrivateAVFoundationCF::setRate): Renamed from updateRate.
310         (WebCore::MediaPlayerPrivateAVFoundationCF::rate): Fetch the rate from the player.
311         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
312         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
313         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
314         (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Renamed from updateRate.
315         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate): Fetch the rate from the player.
316         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
317         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
318         (WebCore::MediaPlayerPrivateQTKit::rate): Fetch the rate from the QTMovie.
319
320 2015-01-11  Anders Carlsson  <andersca@apple.com>
321
322         Merge DatabaseBase into Database
323         https://bugs.webkit.org/show_bug.cgi?id=140345
324
325         Reviewed by Antti Koivisto.
326
327         * CMakeLists.txt:
328         * Modules/webdatabase/Database.cpp:
329         (WebCore::Database::Database):
330         (WebCore::Database::runTransaction):
331         (WebCore::Database::logErrorMessage):
332         * Modules/webdatabase/Database.h:
333         (WebCore::Database::scriptExecutionContext):
334         * Modules/webdatabase/DatabaseBackendBase.cpp:
335         * Modules/webdatabase/DatabaseBackendBase.h:
336         (WebCore::DatabaseBackendBase::setFrontend):
337         * Modules/webdatabase/DatabaseBase.cpp: Removed.
338         * Modules/webdatabase/DatabaseBase.h: Removed.
339         * WebCore.vcxproj/WebCore.vcxproj:
340         * WebCore.vcxproj/WebCore.vcxproj.filters:
341         * WebCore.xcodeproj/project.pbxproj:
342
343 2015-01-12  Darin Adler  <darin@apple.com>
344
345         Modernize and streamline HTMLTokenizer
346         https://bugs.webkit.org/show_bug.cgi?id=140166
347
348         Reviewed by Sam Weinig.
349
350         * html/parser/AtomicHTMLToken.h:
351         (WebCore::AtomicHTMLToken::initializeAttributes): Removed unneeded assertions
352         based on fields I removed.
353
354         * html/parser/HTMLDocumentParser.cpp:
355         (WebCore::HTMLDocumentParser::HTMLDocumentParser): Change to use updateStateFor
356         to set the initial state when parsing a fragment, since it implements the same
357         rule taht the tokenizerStateForContextElement function did.
358         (WebCore::HTMLDocumentParser::pumpTokenizer): Updated to use the revised
359         interfaces for HTMLSourceTracker and HTMLTokenizer.
360         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Changed to take a
361         TokenPtr instead of an HTMLToken, so we can clear out the TokenPtr earlier
362         for non-character tokens, and let them get cleared later for character tokens.
363         (WebCore::HTMLDocumentParser::insert): Pass references.
364         (WebCore::HTMLDocumentParser::append): Ditto.
365         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan): Ditto.
366
367         * html/parser/HTMLDocumentParser.h: Updated argument type for constructTreeFromHTMLToken
368         and removed now-unneeded m_token data members.
369
370         * html/parser/HTMLEntityParser.cpp: Removed unneeded uses of the inline keyword.
371         (WebCore::HTMLEntityParser::consumeNamedEntity): Replaced two uses of
372         advanceAndASSERT with just plain advance; there's really no need to assert the
373         character is the one we just got out of the string.
374
375         * html/parser/HTMLInputStream.h: Moved the include of TextPosition.h here from
376         its old location since this class has two data members that are OrdinalNumber.
377
378         * html/parser/HTMLMetaCharsetParser.cpp:
379         (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser): Removed most of the
380         initialization, since it's now done by defaults.
381         (WebCore::extractCharset): Rewrote this to be a non-member function, and to
382         use a for loop, and to handle quote marks in a simpler way. Also changed it
383         to return a StringView so we don't have to allocate a new string.
384         (WebCore::HTMLMetaCharsetParser::processMeta): Use a modern for loop, and
385         also take a token argument since it's no longer a data member.
386         (WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes): Use a modern for
387         loop, StringView instead of string, and don't bother naming the local enum.
388         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Updated for the new
389         way of getting tokens from the tokenizer.
390
391         * html/parser/HTMLMetaCharsetParser.h: Got rid of some data members and
392         tightened up the formatting a little. Don't bother allocating the tokenizer
393         on the heap.
394
395         * html/parser/HTMLPreloadScanner.cpp:
396         (WebCore::TokenPreloadScanner::TokenPreloadScanner): Removed unneeded
397         initialization.
398         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner): Ditto.
399         (WebCore::HTMLPreloadScanner::scan): Changed to take a reference.
400
401         * html/parser/HTMLPreloadScanner.h: Removed unneeded includes, typedefs,
402         and forward declarations. Removed explicit declaration of the destructor,
403         since the default one works. Removed unused createCheckpoint and rewindTo
404         functions. Gave initial values for various data members. Marked the device
405         scale factor const beacuse it's set in the constructor and never changed.
406         Also removed the unneeded isSafeToSendToAnotherThread.
407
408         * html/parser/HTMLResourcePreloader.cpp:
409         (WebCore::PreloadRequest::isSafeToSendToAnotherThread): Deleted.
410
411         * html/parser/HTMLResourcePreloader.h:
412         (WebCore::PreloadRequest::PreloadRequest): Removed unneeded calls to
413         isolatedCopy. Also removed isSafeToSendToAnotherThread.
414
415         * html/parser/HTMLSourceTracker.cpp:
416         (WebCore::HTMLSourceTracker::startToken): Renamed. Changed to keep state
417          in the source tracker itself, not the token.
418         (WebCore::HTMLSourceTracker::endToken): Ditto.
419         (WebCore::HTMLSourceTracker::source): Renamed. Changed to use the state
420         from the source tracker.
421
422         * html/parser/HTMLSourceTracker.h: Removed unneeded include of HTMLToken.h.
423         Renamed functions, removed now-unneeded comment.
424
425         * html/parser/HTMLToken.h: Cut down on the fields used by the source tracker.
426         It only needs to know the start and end of each attribute, not each part of
427         each attribute. Removed setBaseOffset, setEndOffset, length, addNewAttribute,
428         beginAttributeName, endAttributeName, beginAttributeValue, endAttributeValue,
429         m_baseOffset and m_length. Added beginAttribute and endAttribute.
430         (WebCore::HTMLToken::clear): No need to zero m_length or m_baseOffset any more.
431         (WebCore::HTMLToken::length): Deleted.
432         (WebCore::HTMLToken::setBaseOffset): Deleted.
433         (WebCore::HTMLToken::setEndOffset): Deleted.
434         (WebCore::HTMLToken::beginStartTag): Only null out m_currentAttribute if we
435         are compiling in assertions.
436         (WebCore::HTMLToken::beginEndTag): Ditto.
437         (WebCore::HTMLToken::addNewAttribute): Deleted.
438         (WebCore::HTMLToken::beginAttribute): Moved the code from addNewAttribute in
439         here and set the start offset.
440         (WebCore::HTMLToken::beginAttributeName): Deleted.
441         (WebCore::HTMLToken::endAttributeName): Deleted.
442         (WebCore::HTMLToken::beginAttributeValue): Deleted.
443         (WebCore::HTMLToken::endAttributeValue): Deleted.
444
445         * html/parser/HTMLTokenizer.cpp:
446         (WebCore::HTMLToken::endAttribute): Added. Sets the end offset.
447         (WebCore::HTMLToken::appendToAttributeName): Updated assertion.
448         (WebCore::HTMLToken::appendToAttributeValue): Ditto.
449         (WebCore::convertASCIIAlphaToLower): Renamed from toLowerCase and changed
450         so it's legal to call on lower case letters too.
451         (WebCore::vectorEqualsString): Changed to take a string literal rather than
452         a WTF::String.
453         (WebCore::HTMLTokenizer::inEndTagBufferingState): Made this a member function.
454         (WebCore::HTMLTokenizer::HTMLTokenizer): Updated for data member changes.
455         (WebCore::HTMLTokenizer::bufferASCIICharacter): Added. Optimized version of
456         bufferCharacter for the common case where we know the character is ASCII.
457         (WebCore::HTMLTokenizer::bufferCharacter): Moved this function here from the
458         header since it's only used inside the class.
459         (WebCore::HTMLTokenizer::emitAndResumeInDataState): Moved this here, renamed
460         it and removed the state argument.
461         (WebCore::HTMLTokenizer::emitAndReconsumeInDataState): Ditto.
462         (WebCore::HTMLTokenizer::emitEndOfFile): More of the same.
463         (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded): Ditto.
464         (WebCore::HTMLTokenizer::haveBufferedCharacterToken): Ditto.
465         (WebCore::HTMLTokenizer::flushBufferedEndTag): Updated since m_token is now
466         the actual token, not just a pointer.
467         (WebCore::HTMLTokenizer::flushEmitAndResumeInDataState): Renamed this and
468         removed the state argument.
469         (WebCore::HTMLTokenizer::processToken): This function, formerly nextToken,
470         is now the internal function used by nextToken. Updated its contents to use
471         simpler macros, changed code to set m_state when returning, rather than
472         constantly setting it when cycling through states, switched style to use
473         early return/goto rather than lots of else statements, took out unneeded
474         braces now that BEGIN/END_STATE handles the braces, collapsed upper and
475         lower case letter handling in many states, changed lookAhead call sites to
476         use the new advancePast function instead.
477         (WebCore::HTMLTokenizer::updateStateFor): Set m_state directly instead of
478         calling a setstate function.
479         (WebCore::HTMLTokenizer::appendToTemporaryBuffer): Moved here from header.
480         (WebCore::HTMLTokenizer::temporaryBufferIs): Changed argument type to
481         a literal instead of a WTF::String.
482         (WebCore::HTMLTokenizer::appendToPossibleEndTag): Renamed and changed type
483         to be a UChar instead of LChar, although all characters will be ASCII.
484         (WebCore::HTMLTokenizer::isAppropriateEndTag): Marked const, and changed
485         type from size_t to unsigned.
486
487         * html/parser/HTMLTokenizer.h: Changed interface of nextToken so it returns
488         a TokenPtr so code doesn't have to understand special rules about when to
489         work with an HTMLToken and when to clear it. Made most functions private,
490         and made the State enum private as well. Replaced the state and setState
491         functions with more specific functions for the few states we need to deal
492         with outside the class. Moved function bodies outside the class definition
493         so it's easier to read the class definition.
494
495         * html/parser/HTMLTreeBuilder.cpp:
496         (WebCore::HTMLTreeBuilder::processStartTagForInBody): Updated to use the
497         new set state functions instead of setState.
498         (WebCore::HTMLTreeBuilder::processEndTag): Ditto.
499         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
500         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
501         (WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.
502
503         * html/parser/InputStreamPreprocessor.h: Marked the constructor explicit,
504         and mde it take a reference rather than a pointer.
505
506         * html/parser/TextDocumentParser.cpp:
507         (WebCore::TextDocumentParser::insertFakePreElement): Updated to use the
508         new set state functions instead of setState.
509
510         * html/parser/XSSAuditor.cpp:
511         (WebCore::XSSAuditor::decodedSnippetForName): Updated for name change.
512         (WebCore::XSSAuditor::decodedSnippetForAttribute): Updated for changes to
513         attribute range tracking.
514         (WebCore::XSSAuditor::decodedSnippetForJavaScript): Updated for name change.
515         (WebCore::XSSAuditor::isSafeToSendToAnotherThread): Deleted.
516
517         * html/parser/XSSAuditor.h: Deleted isSafeToSendToAnotherThread.
518
519         * html/track/WebVTTTokenizer.cpp: Removed the local state variable from
520         WEBVTT_ADVANCE_TO; there is no need for it.
521         (WebCore::WebVTTTokenizer::WebVTTTokenizer): Use a reference instead of a
522         pointer for the preprocessor.
523         (WebCore::WebVTTTokenizer::nextToken): Ditto. Also removed the state local
524         variable and the switch statement, replacing with labels instead since we
525         go between states with goto.
526
527         * platform/text/SegmentedString.cpp:
528         (WebCore::SegmentedString::operator=): Changed the return type to be non-const
529         to match normal C++ design rules.
530         (WebCore::SegmentedString::pushBack): Renamed from prepend since this is not a
531         general purpose prepend function. Also fixed assertions to not use the strangely
532         named "escaped" function, since we are deleting it.
533         (WebCore::SegmentedString::append): Ditto.
534         (WebCore::SegmentedString::advancePastNonNewlines): Renamed from advance, since
535         the function only works for non-newlines.
536         (WebCore::SegmentedString::currentColumn): Got rid of unneeded local variable.
537         (WebCore::SegmentedString::advancePastSlowCase): Moved here from header and
538         renamed. This function now consumes the characters if they match.
539
540         * platform/text/SegmentedString.h: Made the changes mentioned above.
541         (WebCore::SegmentedString::excludeLineNumbers): Deleted.
542         (WebCore::SegmentedString::advancePast): Renamed from lookAhead. Also changed
543         behavior so the characters are consumed.
544         (WebCore::SegmentedString::advancePastIgnoringCase): Ditto.
545         (WebCore::SegmentedString::advanceAndASSERT): Deleted.
546         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase): Deleted.
547         (WebCore::SegmentedString::escaped): Deleted.
548
549         * xml/parser/CharacterReferenceParserInlines.h:
550         (WebCore::isHexDigit): Deleted.
551         (WebCore::unconsumeCharacters): Updated for name change.
552         (WebCore::consumeCharacterReference): Removed unneeded name for local enum,
553         renamed local variable "cc" to character. Changed code to use helpers like
554         isASCIIAlpha and toASCIIHexValue. Removed unneeded use of advanceAndASSERT,
555         since we don't really need to assert the character we just extracted.
556
557         * xml/parser/MarkupTokenizerInlines.h:
558         (WebCore::isTokenizerWhitespace): Renamed argument to character.
559         (WebCore::advanceStringAndASSERTIgnoringCase): Deleted.
560         (WebCore::advanceStringAndASSERT): Deleted.
561         Changed all the macro implementations so they set m_state only when
562         returning from the function and just use goto inside the state machine.
563
564 2015-01-11  Andreas Kling  <akling@apple.com>
565
566         Enable Vector bounds checking for ElementDescendantIterator.
567         <https://webkit.org/b/140346>
568
569         Reviewed by Sam Weinig.
570
571         I had originally disabled Vector bounds checking for
572         ElementDescendantIterator's internal ancestor stack, but upon
573         re-running performance benchmarks, it appears to have little-to-no
574         measurable benefit.
575
576         This change adds back the bounds checking.
577
578         * dom/ElementDescendantIterator.h:
579
580 2015-01-11  Chris Dumez  <cdumez@apple.com>
581
582         Drop legacy SVGCSSStyleSelector.cpp
583         https://bugs.webkit.org/show_bug.cgi?id=140342
584
585         Reviewed by Antti Koivisto.
586
587         Drop legacy SVGCSSStyleSelector.cpp by porting the remaining SVG CSS
588         properties to the generated StyleBuilder. This patch also removes
589         support for the "LegacyStyleBuilder" option in CSSPropertyNames.in
590         as all properties have now been ported over.
591
592         * CMakeLists.txt:
593         * WebCore.vcxproj/WebCore.vcxproj:
594         * WebCore.vcxproj/WebCore.vcxproj.filters:
595         * WebCore.xcodeproj/project.pbxproj:
596         Drop SVGCSSStyleSelector.cpp file as it was removed.
597
598         * css/CSSPropertyNames.in:
599         * css/SVGCSSStyleSelector.cpp: Removed.
600         * css/StyleBuilder.h:
601         StyleBuilder::applyProperty() no longer need to return a boolean as
602         it now handles ALL CSS properties.
603
604         * css/StyleBuilderCustom.h:
605         (WebCore::StyleBuilderCustom::applyValueBaselineShift):
606         (WebCore::StyleBuilderCustom::applyInitialFill):
607         (WebCore::StyleBuilderCustom::applyInheritFill):
608         (WebCore::StyleBuilderCustom::applyValueFill):
609         (WebCore::StyleBuilderCustom::applyInitialStroke):
610         (WebCore::StyleBuilderCustom::applyInheritStroke):
611         (WebCore::StyleBuilderCustom::applyValueStroke):
612         (WebCore::StyleBuilderCustom::applyInitialWebkitSvgShadow):
613         (WebCore::StyleBuilderCustom::applyInheritWebkitSvgShadow):
614         (WebCore::StyleBuilderCustom::applyValueWebkitSvgShadow):
615         Move 'fill', 'stroke' and '-webkit-svg-shadow' to the new
616         StyleBuilder.
617
618         * css/StyleResolver.cpp:
619         (WebCore::StyleResolver::applyProperty):
620         * css/makeprop.pl:
621
622 2015-01-11  Antti Koivisto  <antti@apple.com>
623
624         Remove FontCachePurgePreventer
625         https://bugs.webkit.org/show_bug.cgi?id=139628
626
627         Reviewed by Anders Carlsson.
628
629         This stack type is bug prone and invasive. A missing FontCachePurgePreventer in a code that touches fonts is always
630         a hard-to-detect bug and there are many places that need it. Instead purge the font cache on top of the runloop.
631
632         The purge timer could in principle fire in a nested runloop. However we should never have unreferenced
633         SimpleFontData objects in the stack in such case (GlyphData objects don't currently ref the font) because those
634         only occur during layout and painting. Layout and painting can't trigger a nested runloops as there would be
635         bigger problems.
636
637         Purging may also be triggered synchronously by a memory notification. That case won't have any GlyphDatas in the stack either.
638
639         * html/canvas/CanvasRenderingContext2D.cpp:
640         (WebCore::CanvasRenderingContext2D::measureText):
641         (WebCore::CanvasRenderingContext2D::drawTextInternal):
642         * page/FrameView.cpp:
643         (WebCore::FrameView::layout):
644         (WebCore::FrameView::paintContents):
645         * platform/graphics/FontCache.cpp:
646         (WebCore::FontCache::FontCache):
647         (WebCore::FontCache::fontForFamily):
648         (WebCore::FontCache::purgeTimerFired):
649         (WebCore::FontCache::purgeInactiveFontData):
650         * platform/graphics/FontCache.h:
651         (WebCore::FontCache::disablePurging): Deleted.
652         (WebCore::FontCache::enablePurging): Deleted.
653         (WebCore::FontCachePurgePreventer::FontCachePurgePreventer): Deleted.
654         (WebCore::FontCachePurgePreventer::~FontCachePurgePreventer): Deleted.
655         * platform/graphics/FontFastPath.cpp:
656         (WebCore::Font::emphasisMarkAscent):
657         (WebCore::Font::emphasisMarkDescent):
658         (WebCore::Font::emphasisMarkHeight):
659         (WebCore::Font::drawEmphasisMarks):
660         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
661         (PlatformCALayerWinInternal::displayCallback):
662         * platform/mac/DragImageMac.mm:
663         (WebCore::widthWithFont):
664         (WebCore::drawAtPoint):
665         (WebCore::createDragImageForLink):
666         * platform/win/DragImageWin.cpp:
667         (WebCore::createDragImageForLink):
668         * platform/win/WebCoreTextRenderer.cpp:
669         (WebCore::doDrawTextAtPoint):
670         (WebCore::WebCoreTextFloatWidth):
671         * rendering/InlineTextBox.cpp:
672         (WebCore::InlineTextBox::localSelectionRect):
673         (WebCore::InlineTextBox::offsetForPosition):
674         (WebCore::InlineTextBox::positionForOffset):
675         * rendering/RenderImage.cpp:
676         (WebCore::RenderImage::setImageSizeForAltText):
677         * rendering/RenderLayerBacking.cpp:
678         (WebCore::RenderLayerBacking::paintIntoLayer):
679         * rendering/RenderListBox.cpp:
680         (WebCore::RenderListBox::updateFromElement):
681         (WebCore::RenderListBox::paintItemForeground):
682         * rendering/RenderMenuList.cpp:
683         (RenderMenuList::updateOptionsWidth):
684         * rendering/RenderThemeIOS.mm:
685         (WebCore::adjustInputElementButtonStyle):
686         * rendering/mathml/RenderMathMLOperator.cpp:
687         (WebCore::RenderMathMLOperator::updateStyle):
688         * rendering/svg/RenderSVGText.cpp:
689         (WebCore::RenderSVGText::subtreeChildWasAdded):
690         (WebCore::RenderSVGText::subtreeStyleDidChange):
691         (WebCore::RenderSVGText::subtreeTextDidChange):
692         (WebCore::RenderSVGText::removeChild):
693         * rendering/svg/SVGInlineTextBox.cpp:
694         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
695
696 2015-01-11  Myles C. Maxfield  <mmaxfield@apple.com>
697
698         [SVG -> OTF Converter] Implement ligatures
699         https://bugs.webkit.org/show_bug.cgi?id=137094
700
701         Reviewed by Dan Bernstein.
702
703         Use the "liga" OpenType feature to implement ligatures inside the GSUB table.
704
705         Tests: svg/W3C-SVG-1.1/fonts-glyph-04-t.svg
706                svg/W3C-SVG-1.1/text-text-06-t.svg
707                svg/text/kerning.svg
708                svg/text/multichar-glyph.svg
709
710         * svg/SVGToOTFFontConversion.cpp:
711         (WebCore::SVGToOTFFontConverter::grow):
712         (WebCore::SVGToOTFFontConverter::appendCMAPTable): Use StringView::codePoints().
713         (WebCore::SVGToOTFFontConverter::firstGlyph): Returns the first element of the input
714         vector, along with some ASSERTs.
715         (WebCore::SVGToOTFFontConverter::appendLigatureSubtable):
716         (WebCore::SVGToOTFFontConverter::appendScriptSubtable): Used inside appendGSUBTable.
717         (WebCore::SVGToOTFFontConverter::appendGSUBTable): Updating for ligatures.
718         (WebCore::codepointToString): Wrapper around U16_APPEND().
719         (WebCore::SVGToOTFFontConverter::glyphsForCodepoint): Call codepointToString and look
720         in internal map.
721         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Use glyphsForCodepoint().
722         (WebCore::SVGToOTFFontConverter::appendLigatureGlyphs): Ligatures are implemented as
723         mapping a sequence of glyphs to another glyph inside OpenType. However, SVG models
724         ligatures as mapping a sequence of codepoints to a glyph. This function makes dummy
725         glyphs for all the codepoints that we don't have glyphs for and appends them to
726         m_glyphs.
727         (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically):
728         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Use appendEmptyGlyph() and
729         call appendLigatureGlyphs().
730
731 2015-01-11  Chris Dumez  <cdumez@apple.com>
732
733         Move more SVG CSS properties to the new StyleBuilder
734         https://bugs.webkit.org/show_bug.cgi?id=140340
735
736         Reviewed by Antti Koivisto.
737
738         Move more SVG CSS properties to the new StyleBuilder by introducing
739         the necessary converters in StyleBuilderConverter.
740
741         * css/CSSPropertyNames.in:
742         * css/SVGCSSStyleSelector.cpp:
743         (WebCore::StyleResolver::applySVGProperty):
744         (WebCore::roundToNearestGlyphOrientationAngle): Deleted.
745         (WebCore::angleToGlyphOrientation): Deleted.
746         (WebCore::colorFromSVGColorCSSValue): Deleted.
747         * css/StyleBuilderConverter.h:
748         (WebCore::StyleBuilderConverter::convertNumber):
749         (WebCore::StyleBuilderConverter::convertNumberOrAuto):
750         (WebCore::StyleBuilderConverter::convertOpacity):
751         (WebCore::StyleBuilderConverter::convertSVGURIReference):
752         (WebCore::StyleBuilderConverter::convertSVGColor):
753         (WebCore::StyleBuilderConverter::convertGlyphOrientation):
754         (WebCore::StyleBuilderConverter::convertGlyphOrientationOrAuto):
755         * rendering/style/RenderStyle.h:
756
757 2015-01-10  Csaba Osztrogonác  <ossy@webkit.org>
758
759         Unreviewed buildfix for !ENABLE(INSPECTOR) builds after r178201.
760
761         * inspector/InspectorInstrumentation.h:
762         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
763
764 2015-01-10  Chris Dumez  <cdumez@apple.com>
765
766         Move 'kerning' / 'paint-order' / 'stroke-dasharray' SVG CSS properties to the new StyleBuilder
767         https://bugs.webkit.org/show_bug.cgi?id=140327
768
769         Reviewed by Sam Weinig.
770
771         Move 'kerning' / 'paint-order' / 'stroke-dasharray' SVG CSS properties
772         to the new StyleBuilder by introducing the necessary converters in
773         StyleBuilderConverter.
774
775         * css/CSSPropertyNames.in:
776         * css/SVGCSSStyleSelector.cpp:
777         (WebCore::StyleResolver::applySVGProperty):
778         * css/StyleBuilderConverter.h:
779         (WebCore::StyleBuilderConverter::convertSVGLength):
780         (WebCore::StyleBuilderConverter::convertSVGLengthVector):
781         (WebCore::StyleBuilderConverter::convertStrokeDashArray):
782         (WebCore::StyleBuilderConverter::convertPaintOrder):
783         * svg/SVGLength.cpp:
784         (WebCore::SVGLength::fromCSSPrimitiveValue):
785         * svg/SVGLength.h:
786
787 2015-01-09  Andreas Kling  <akling@apple.com>
788
789         CTTE: GeolocationController always has a client.
790         <https://webkit.org/b/140330>
791
792         Reviewed by Anders Carlsson.
793
794         Change GeolocationController::m_client to be a reference and remove
795         a whole bunch of unnecessary null checks.
796
797         * Modules/geolocation/GeolocationController.cpp:
798         (WebCore::GeolocationController::GeolocationController):
799         (WebCore::GeolocationController::~GeolocationController):
800         (WebCore::GeolocationController::addObserver):
801         (WebCore::GeolocationController::removeObserver):
802         (WebCore::GeolocationController::requestPermission):
803         (WebCore::GeolocationController::cancelPermissionRequest):
804         (WebCore::GeolocationController::lastPosition):
805         (WebCore::GeolocationController::viewStateDidChange):
806         (WebCore::provideGeolocationTo):
807         * Modules/geolocation/GeolocationController.h:
808         (WebCore::GeolocationController::client):
809
810 2015-01-09  Zalan Bujtas  <zalan@apple.com>
811
812         Calling clearSelection on a detached RenderObject leads to segfault.
813         https://bugs.webkit.org/show_bug.cgi?id=140275
814
815         Reviewed by Simon Fraser.
816
817         We collect selection rects and compute selection gaps in order to
818         paint/clear selection. With certain content, we need to be able
819         to walk the tree up to a particular container to compute the selection rect.
820         However this container might not be available when the selection is part of a detached tree.
821         This is a null-check fix to ensure we don't crash in such cases, but in the long run
822         selection gaps and rect should be cached between two layouts so that we don't need to
823         keep collecting/recomputing them. Tracked here: webkit.org/b/140321
824
825         Test: editing/selection/clearselection-on-detached-subtree-crash.html
826
827         * rendering/RenderBox.cpp:
828         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
829         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
830         * rendering/RenderView.cpp:
831         (WebCore::RenderView::clearSelection):
832
833 2015-01-09  Anders Carlsson  <andersca@apple.com>
834
835         Remove more sync database code
836         https://bugs.webkit.org/show_bug.cgi?id=140328
837
838         Reviewed by Sam Weinig.
839
840         * Modules/webdatabase/AbstractDatabaseServer.h:
841         * Modules/webdatabase/DatabaseBackend.cpp:
842         (WebCore::DatabaseBackend::DatabaseBackend):
843         * Modules/webdatabase/DatabaseBackendBase.cpp:
844         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
845         * Modules/webdatabase/DatabaseBackendBase.h:
846         (WebCore::DatabaseBackendBase::isSyncDatabase): Deleted.
847         * Modules/webdatabase/DatabaseBasicTypes.h:
848         * Modules/webdatabase/DatabaseManager.cpp:
849         (WebCore::DatabaseManager::openDatabaseBackend):
850         (WebCore::DatabaseManager::openDatabase):
851         * Modules/webdatabase/DatabaseManager.h:
852         * Modules/webdatabase/DatabaseServer.cpp:
853         (WebCore::DatabaseServer::openDatabase):
854         (WebCore::DatabaseServer::createDatabase):
855         * Modules/webdatabase/DatabaseServer.h:
856
857 2015-01-09  Daniel Bates  <dabates@apple.com>
858
859         Fix the iOS build after <http://trac.webkit.org/changeset/178213>
860         (https://bugs.webkit.org/show_bug.cgi?id=140310)
861
862         * platform/spi/cocoa/CoreTextSPI.h:
863         * rendering/RenderThemeIOS.mm:
864         (WebCore::RenderThemeIOS::systemFont):
865
866 2015-01-09  Chris Dumez  <cdumez@apple.com>
867
868         Get rid of legacy StyleBuilder switch in StyleResolver.cpp
869         https://bugs.webkit.org/show_bug.cgi?id=140315
870
871         Reviewed by Sam Weinig.
872
873         Get rid of legacy StyleBuilder switch in StyleResolver.cpp now that most
874         properties have been ported to the new generated StyleBuilder in previous
875         patches. The properties that remained in this switch were shorthand
876         properties or other properties that do not require any handling in the
877         StyleBuilder.
878
879         To achieve this, this patch introduces 2 parameters in
880         CSSPropertyNames.in:
881         - SkipBuilder: Indicates that no StyleBuilder code should be generated
882           for this property.
883         - Shorthand: Indicates that this is a shorthand property, which therefore
884           does not use the StyleBuilder. makeprop.pl will merely generate
885           assertions for such properties, to validate that this is a shorthand
886           property and that the StyleBuilder code is never reached.
887
888         * css/CSSPropertyNames.in:
889         * css/SVGCSSStyleSelector.cpp:
890         (WebCore::StyleResolver::applySVGProperty):
891         * css/StyleResolver.cpp:
892         (WebCore::StyleResolver::applyProperty):
893         * css/makeprop.pl:
894
895 2015-01-09  Brent Fulgham  <bfulgham@apple.com>
896
897         [Win] Build fix after r178219.
898
899         * WebCore.vcxproj/WebCore.vcxproj: Remove PaintHooks.asm references in project file.
900         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
901
902 2015-01-09  Andreas Kling  <akling@apple.com>
903
904         Log which ActiveDOMObject(s) can't be suspended for PageCache.
905         <https://webkit.org/b/139697>
906
907         Reviewed by Chris Dumez.
908
909         Give ActiveDOMObject a pure virtual activeDOMObjectName() so we can
910         find their names.
911
912         Dump the names of all the ActiveDOMObjects that fail to suspend when
913         we're trying to put a page into PageCache.
914
915         * Modules/encryptedmedia/MediaKeySession.h:
916         * Modules/geolocation/Geolocation.h:
917         * Modules/indexeddb/IDBDatabase.h:
918         * Modules/indexeddb/IDBRequest.h:
919         * Modules/indexeddb/IDBTransaction.h:
920         * Modules/mediasource/MediaSource.h:
921         * Modules/mediasource/SourceBuffer.h:
922         * Modules/mediastream/MediaStreamTrack.h:
923         * Modules/mediastream/RTCDTMFSender.h:
924         * Modules/mediastream/RTCPeerConnection.h:
925         * Modules/mediastream/RTCSessionDescriptionRequestImpl.h:
926         * Modules/mediastream/RTCStatsRequestImpl.h:
927         * Modules/mediastream/RTCVoidRequestImpl.h:
928         * Modules/notifications/Notification.h:
929         * Modules/notifications/NotificationCenter.h:
930         * Modules/webaudio/AudioContext.h:
931         * Modules/webdatabase/DatabaseContext.h:
932         * Modules/websockets/WebSocket.h:
933         * WebCore.exp.in:
934         * css/FontLoader.h:
935         * dom/ActiveDOMObject.h:
936         * dom/ScriptExecutionContext.cpp:
937         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
938         * dom/ScriptExecutionContext.h:
939         * fileapi/FileReader.h:
940         * history/PageCache.cpp:
941         (WebCore::logCanCacheFrameDecision):
942         * html/HTMLMarqueeElement.h:
943         * html/HTMLMediaElement.h:
944         * html/PublicURLManager.h:
945         * html/canvas/WebGLRenderingContext.h:
946         * page/EventSource.h:
947         * page/SuspendableTimer.h:
948         * workers/AbstractWorker.h:
949         * xml/XMLHttpRequest.h:
950
951 2015-01-09  Anders Carlsson  <andersca@apple.com>
952
953         Get rid of the database strategy
954         https://bugs.webkit.org/show_bug.cgi?id=140322
955
956         Reviewed by Sam Weinig.
957
958         * CMakeLists.txt:
959         * Modules/webdatabase/DatabaseManager.cpp:
960         (WebCore::DatabaseManager::ProposedDatabase::ProposedDatabase):
961         (WebCore::DatabaseManager::DatabaseManager):
962         * WebCore.exp.in:
963         * WebCore.vcxproj/WebCore.vcxproj:
964         * WebCore.vcxproj/WebCore.vcxproj.filters:
965         * WebCore.xcodeproj/project.pbxproj:
966         * platform/DatabaseStrategy.cpp: Removed.
967         * platform/DatabaseStrategy.h: Removed.
968         * platform/PlatformStrategies.h:
969         (WebCore::PlatformStrategies::PlatformStrategies):
970         (WebCore::PlatformStrategies::databaseStrategy): Deleted.
971
972 2015-01-06  Anders Carlsson  <andersca@apple.com>
973
974         Move the Windows only plug-in code to WebKit/win
975         https://bugs.webkit.org/show_bug.cgi?id=140133
976
977         Reviewed by Darin Adler.
978
979         * WebCore.vcxproj/WebCore.vcxproj:
980         * WebCore.vcxproj/WebCore.vcxproj.filters:
981
982 2015-01-09  Anders Carlsson  <andersca@apple.com>
983
984         Another Windows build fix.
985
986         * DerivedSources.cpp:
987
988 2015-01-09  Enrica Casucci  <enrica@apple.com>
989
990         [iOS] Support additional text styles.
991         https://bugs.webkit.org/show_bug.cgi?id=140310
992         rdar://problem/18568864
993
994         Reviewed by Joseph Pecoraro.
995
996         Add support for three new text styles.
997
998         * css/CSSValueKeywords.in:
999         * rendering/RenderThemeIOS.mm:
1000         (WebCore::RenderThemeIOS::systemFont):
1001
1002 2015-01-09  Anders Carlsson  <andersca@apple.com>
1003
1004         Fix Windows build.
1005
1006         * bindings/js/JSBindingsAllInOne.cpp:
1007
1008 2015-01-09  Anders Carlsson  <andersca@apple.com>
1009
1010         Remove more worker database code
1011         https://bugs.webkit.org/show_bug.cgi?id=140320
1012
1013         Reviewed by Tim Horton.
1014
1015         * workers/WorkerThread.cpp:
1016         (WebCore::WorkerThread::stop):
1017
1018 2015-01-09  Anders Carlsson  <andersca@apple.com>
1019
1020         Remove more sync database code
1021         https://bugs.webkit.org/show_bug.cgi?id=140318
1022
1023         Reviewed by Sam Weinig.
1024
1025         * CMakeLists.txt:
1026         * DerivedSources.make:
1027         * Modules/webdatabase/DatabaseBackendSync.cpp: Removed.
1028         * Modules/webdatabase/DatabaseBackendSync.h: Removed.
1029         * Modules/webdatabase/DatabaseCallback.h:
1030         * Modules/webdatabase/DatabaseCallback.idl:
1031         * Modules/webdatabase/DatabaseManager.cpp:
1032         (WebCore::DatabaseManager::openDatabaseSync): Deleted.
1033         * Modules/webdatabase/DatabaseManager.h:
1034         * Modules/webdatabase/DatabaseServer.cpp:
1035         (WebCore::DatabaseServer::createDatabase):
1036         * Modules/webdatabase/DatabaseSync.cpp: Removed.
1037         * Modules/webdatabase/DatabaseSync.h: Removed.
1038         * Modules/webdatabase/DatabaseSync.idl: Removed.
1039         * Modules/webdatabase/SQLStatementSync.cpp: Removed.
1040         * Modules/webdatabase/SQLStatementSync.h: Removed.
1041         * Modules/webdatabase/SQLTransactionBackendSync.cpp: Removed.
1042         * Modules/webdatabase/SQLTransactionBackendSync.h: Removed.
1043         * Modules/webdatabase/SQLTransactionSync.cpp: Removed.
1044         * Modules/webdatabase/SQLTransactionSync.h: Removed.
1045         * Modules/webdatabase/SQLTransactionSync.idl: Removed.
1046         * Modules/webdatabase/SQLTransactionSyncCallback.h: Removed.
1047         * Modules/webdatabase/SQLTransactionSyncCallback.idl: Removed.
1048         * WebCore.vcxproj/WebCore.vcxproj:
1049         * WebCore.vcxproj/WebCore.vcxproj.filters:
1050         * WebCore.xcodeproj/project.pbxproj:
1051         * bindings/js/JSSQLTransactionSyncCustom.cpp: Removed.
1052
1053 2015-01-09  Joseph Pecoraro  <pecoraro@apple.com>
1054
1055         Web Inspector: Remove or use TimelineAgent Resource related event types
1056         https://bugs.webkit.org/show_bug.cgi?id=140155
1057
1058         Reviewed by Timothy Hatcher.
1059
1060         Remove unused timeline events. The frontend was ignoring these events
1061         and was often already getting nearly identical data from the Network domain.
1062
1063         * WebCore.exp.in:
1064         * inspector/InspectorInstrumentation.cpp:
1065         (WebCore::InspectorInstrumentation::willSendRequestImpl):
1066         (WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
1067         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
1068         (WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
1069         (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
1070         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
1071         (WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl): Deleted.
1072         (WebCore::InspectorInstrumentation::willReceiveResourceDataImpl): Deleted.
1073         (WebCore::InspectorInstrumentation::didReceiveResourceDataImpl): Deleted.
1074         * inspector/InspectorInstrumentation.h:
1075         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
1076         (WebCore::InspectorInstrumentation::didScheduleResourceRequest): Deleted.
1077         (WebCore::InspectorInstrumentation::willReceiveResourceData): Deleted.
1078         (WebCore::InspectorInstrumentation::didReceiveResourceData): Deleted.
1079         * inspector/InspectorTimelineAgent.cpp:
1080         (WebCore::toProtocol):
1081         (WebCore::InspectorTimelineAgent::didScheduleResourceRequest): Deleted.
1082         (WebCore::InspectorTimelineAgent::willSendResourceRequest): Deleted.
1083         (WebCore::InspectorTimelineAgent::willReceiveResourceData): Deleted.
1084         (WebCore::InspectorTimelineAgent::didReceiveResourceData): Deleted.
1085         (WebCore::InspectorTimelineAgent::willReceiveResourceResponse): Deleted.
1086         (WebCore::InspectorTimelineAgent::didReceiveResourceResponse): Deleted.
1087         (WebCore::InspectorTimelineAgent::didFinishLoadingResource): Deleted.
1088         * inspector/InspectorTimelineAgent.h:
1089         * inspector/TimelineRecordFactory.cpp:
1090         (WebCore::TimelineRecordFactory::createScheduleResourceRequestData): Deleted.
1091         (WebCore::TimelineRecordFactory::createResourceSendRequestData): Deleted.
1092         (WebCore::TimelineRecordFactory::createResourceReceiveResponseData): Deleted.
1093         (WebCore::TimelineRecordFactory::createResourceFinishData): Deleted.
1094         (WebCore::TimelineRecordFactory::createReceiveResourceData): Deleted.
1095         * inspector/TimelineRecordFactory.h:
1096         * loader/DocumentThreadableLoader.cpp:
1097         (WebCore::DocumentThreadableLoader::didReceiveResponse):
1098         * loader/ResourceLoadNotifier.cpp:
1099         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
1100         * loader/ResourceLoadScheduler.cpp:
1101         (WebCore::ResourceLoadScheduler::scheduleLoad):
1102         (WebCore::ResourceLoadScheduler::notifyDidScheduleResourceRequest): Deleted.
1103         * loader/ResourceLoadScheduler.h:
1104         * loader/ResourceLoader.cpp:
1105         (WebCore::ResourceLoader::didReceiveData):
1106         (WebCore::ResourceLoader::didReceiveBuffer):
1107         * loader/appcache/ApplicationCacheGroup.cpp:
1108         (WebCore::ApplicationCacheGroup::didReceiveResponse):
1109         * loader/mac/ResourceLoaderMac.mm:
1110         (WebCore::ResourceLoader::didReceiveDataArray):
1111
1112 2015-01-09  Benjamin Poulain  <bpoulain@apple.com>
1113
1114         Update r177745, one of the review comments was not integrated
1115
1116         * css/SelectorCheckerTestFunctions.h:
1117         (WebCore::matchesLangPseudoClass):
1118         I cq+ before Dhi could make an update and this was left out.
1119
1120 2015-01-09  Benjamin Poulain  <benjamin@webkit.org>
1121
1122         Fix error handling of ContentExtensionsManager when the top level input is unusable
1123         https://bugs.webkit.org/show_bug.cgi?id=140284
1124
1125         Reviewed by Andreas Kling.
1126
1127         There are a couple of ways the WebProcess would crash if the input
1128         is really really bad:
1129         -If the JSON is unreadable, we can have an exception or decodedRules can be null.
1130         -On any of the error, we cannot return immediately or we will skip vm.clear().
1131
1132         This patch adds a branch to fix the first issue.
1133
1134         For the second issue, a new function, loadEncodedRules(), encapsulate all the early
1135         returns to make sure we execute the end of loadExtension().
1136
1137         * contentextensions/ContentExtensionsManager.cpp:
1138         (WebCore::ContentExtensions::ExtensionsManager::loadEncodedRules):
1139         (WebCore::ContentExtensions::ExtensionsManager::loadExtension):
1140
1141 2015-01-09  Bem Jones-Bey  <bjonesbe@adobe.com>
1142
1143         Simplify LineWidth::wrapNextToShapeOutside()
1144         https://bugs.webkit.org/show_bug.cgi?id=140304
1145
1146         Reviewed by Zoltan Horvath.
1147
1148         This function used to manually check to see if the entire height of
1149         the line would have enough space next to the float. However, the code
1150         to compute the offsets will do this automatically (and probably a lot
1151         faster), if the line height is passed in. This patch does just that.
1152
1153         No new tests, no behavior change.
1154
1155         * rendering/line/LineWidth.cpp:
1156         (WebCore::availableWidthAtOffset): Remove now unused override, allow
1157             passing in lineHeight.
1158         (WebCore::LineWidth::wrapNextToShapeOutside): Pass the lineHeight
1159             when computing the available width, so we don't need to check
1160             isWholeLineFit anymore.
1161         (WebCore::isWholeLineFit): Deleted.
1162
1163 2015-01-09  Bem Jones-Bey  <bjonesbe@adobe.com>
1164
1165         [CSS Shapes] content inside second shape area when two floats interact
1166         https://bugs.webkit.org/show_bug.cgi?id=137702
1167
1168         Reviewed by Zalan Bujtas.
1169
1170         If a float has a shape-outside, we cannot assume that it has a uniform
1171         width for the height of the float, so we cannot use simple line
1172         layout.
1173
1174         Test: fast/shapes/shape-outside-floats/shape-outside-text-overlap-float.html
1175
1176         * rendering/SimpleLineLayout.cpp:
1177         (WebCore::SimpleLineLayout::canUseFor): Don't use simple line layout
1178             if we have shape-outside. Also, rename floatRenderer to
1179             floatingObject, since the variable doesn't contain a renderer.
1180
1181 2015-01-09  Chris Dumez  <cdumez@apple.com>
1182
1183         Allow HTTPS + 'Cache-control: no-store' sub-frames into the page cache
1184         https://bugs.webkit.org/show_bug.cgi?id=140302
1185
1186         Reviewed by Andreas Kling.
1187
1188         Allow HTTPS + 'Cache-control: no-store' sub-frames into the page cache.
1189         We already restore 'no-store' sub-resources on history navigation from
1190         the memory cache so there is no reason for our page cache policy to be
1191         more restrictive.
1192
1193         We should align our memory cache / history navigation policy with our
1194         page cache policy.
1195
1196         For now, 'no-store' main resources are not restored from either cache
1197         (memory cache / page cache) on history navigation though. This behavior
1198         does not change.
1199
1200         Test: http/tests/navigation/https-no-store-subframe-in-page-cache.html
1201
1202         * history/PageCache.cpp:
1203         (WebCore::logCanCacheFrameDecision):
1204         (WebCore::PageCache::canCachePageContainingThisFrame):
1205
1206 2015-01-09  Anders Carlsson  <andersca@apple.com>
1207
1208         Try to trigger a rebuild of generated JS bindings.
1209
1210         * bindings/scripts/CodeGeneratorJS.pm:
1211
1212 2015-01-09  Chris Dumez  <cdumez@apple.com>
1213
1214         Add support for SVG CSS Properties to the new StyleBuilder
1215         https://bugs.webkit.org/show_bug.cgi?id=140277
1216
1217         Reviewed by Andreas Kling.
1218
1219         Update the new StyleBuilder generator to add support for SVG CSS
1220         Properties whose methods are on SVGRenderStyle instead of RenderStyle.
1221
1222         A new "SVG" parameter is now supported by makeprop.pl to correctly
1223         generate such properties.
1224
1225         * CMakeLists.txt:
1226         * DerivedSources.make:
1227         * WebCore.xcodeproj/project.pbxproj:
1228         * css/CSSPropertyNames.in:
1229         * css/SVGCSSPropertyNames.in: Removed.
1230         Merged SVG CSS properties into CSSPropertyNames.in. I personally don't
1231         think having a separate file for SVG CSS properties is really helpful.
1232
1233         * css/SVGCSSStyleSelector.cpp:
1234         (WebCore::StyleResolver::applySVGProperty):
1235         Drop legacy StyleBuilder code for several SVG properties and generate
1236         them instead. Those are trivial and do not require any custom code or
1237         converter.
1238
1239         * css/StyleResolver.cpp:
1240         Update the id of the first low-priority property.
1241
1242         * css/makeprop.pl:
1243         Add support for SVG CSS Properties whose methods are on SVGRenderStyle
1244         instead of RenderStyle.
1245
1246 2015-01-08  Anders Carlsson  <andersca@apple.com>
1247
1248         Start removing Web Database support from workers
1249         https://bugs.webkit.org/show_bug.cgi?id=140271
1250
1251         Reviewed by Sam Weinig.
1252
1253         Remove WorkerGlobalScopeWebDatabase which is the entry point for web database in workers.
1254
1255         * CMakeLists.txt:
1256         * DerivedSources.make:
1257         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp: Removed.
1258         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.h: Removed.
1259         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl: Removed.
1260         * WebCore.vcxproj/WebCore.vcxproj:
1261         * WebCore.vcxproj/WebCore.vcxproj.filters:
1262         * WebCore.xcodeproj/project.pbxproj:
1263
1264 2015-01-09  Brent Fulgham  <bfulgham@apple.com>
1265
1266         [Win] Layout Test fast/canvas/canvas-path-addPath.html is failing
1267         https://bugs.webkit.org/show_bug.cgi?id=140303
1268         <rdar://problem/19428865>
1269
1270         Reviewed by Simon Fraser.
1271
1272         Although the code clearly states that CG doesn't allow adding a path to itself,
1273         and branches to handle this case, it simply uses the branch to try adding the
1274         path to itself (ignoring the copy it just made)!
1275
1276         Fix this copy/paste bug so that we use the copy and avoid violating the CG 
1277         API contract.
1278
1279         * platform/graphics/cg/PathCG.cpp:
1280         (WebCore::Path::addPath): Fix path used.
1281
1282 2015-01-09  Andreas Kling  <akling@apple.com>
1283
1284         [Cocoa] Make decoded image data purgeable ASAP.
1285         <https://webkit.org/b/140298>
1286
1287         Reviewed by Antti Koivisto.
1288
1289         Mark decoded images as "transient" which makes CoreGraphics mark
1290         the backing stores as purgeable shortly after they're used.
1291
1292         The decoded representation will remain in CoreGraphics's caches
1293         indefinitely unless the kernel gets starved and needs the pages.
1294
1295         Most resources will now reach a state where the encoded data is
1296         mmap'ed from disk cache (once the entire resource is downloaded)
1297         and the decoded data is purgeable.
1298
1299         This also has the side effect of making the MemoryCache more
1300         palatial since the decoded data cost can be deducted for images,
1301         allowing us to cache more resources.
1302
1303         Note that the worst case for this new behavior would be something
1304         like hovering below 100% memory utilization and constantly having
1305         to drop and re-decode images. While churny, it still beats
1306         crashing the process, plus there's tiling to remove many of the
1307         reasons we'd need the decoded data.
1308
1309         * platform/graphics/cg/ImageSourceCG.cpp:
1310         (WebCore::ImageSource::createFrameAtIndex):
1311
1312 2015-01-09  Gwang Yoon Hwang  <yoon@igalia.com>
1313
1314         Rename GraphicsLayerAnimation to TextureMapperAnimation
1315         https://bugs.webkit.org/show_bug.cgi?id=140296
1316
1317         Reviewed by Martin Robinson.
1318
1319         GraphicsLayerAnimation is only used by TextureMapper and CoordinatedGraphics.
1320         This should be placed in the platform/graphics/texmap.
1321         And this patch also changes its name to TextureMapperAnimation to remove ambiguity.
1322
1323         No new tests because this is a simply refactoring.
1324
1325         * CMakeLists.txt:
1326         * WebCore.vcxproj/WebCore.vcxproj:
1327         * WebCore.vcxproj/WebCore.vcxproj.filters:
1328         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1329         (WebCore::GraphicsLayerTextureMapper::addAnimation):
1330         (WebCore::GraphicsLayerTextureMapper::setAnimations):
1331         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1332         * platform/graphics/texmap/TextureMapperAnimation.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsLayerAnimation.cpp.
1333         * platform/graphics/texmap/TextureMapperAnimation.h: Renamed from Source/WebCore/platform/graphics/GraphicsLayerAnimation.h.
1334         * platform/graphics/texmap/TextureMapperLayer.cpp:
1335         (WebCore::TextureMapperLayer::setAnimations):
1336         * platform/graphics/texmap/TextureMapperLayer.h:
1337         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1338         (WebCore::CoordinatedGraphicsLayer::addAnimation):
1339         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1340         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
1341
1342 2015-01-09  Antti Koivisto  <antti@apple.com>
1343
1344         FontCache should only deal with SimpleFontData
1345         https://bugs.webkit.org/show_bug.cgi?id=140293
1346
1347         Reviewed by Andreas Kling.
1348
1349         FontCache::fontForFamilyAtIndex hands out FontData objects and calls to FontSelector. That sort
1350         of code does not belong to the cache layer. Move the functionality up to FontGlyphs.
1351
1352         * platform/graphics/Font.cpp:
1353         (WebCore::Font::operator==):
1354         (WebCore::Font::drawText):
1355         (WebCore::Font::drawEmphasisMarks):
1356         (WebCore::Font::isLoadingCustomFonts):
1357         * platform/graphics/Font.h:
1358         (WebCore::Font::loadingCustomFonts): Deleted.
1359         * platform/graphics/FontCache.cpp:
1360         (WebCore::FontCache::similarFontPlatformData):
1361
1362             Generic null implementation to reduce #ifs.
1363
1364         (WebCore::FontCache::fontForFamilyAtIndex): Deleted.
1365         * platform/graphics/FontCache.h:
1366
1367             Unfriend FontGlyphs.
1368
1369         * platform/graphics/FontGlyphs.cpp:
1370         (WebCore::FontGlyphs::FontGlyphs):
1371         (WebCore::FontGlyphs::isLoadingCustomFonts):
1372
1373             We can figure thus out cheaply without caching a bit.
1374
1375         (WebCore::realizeNextFamily):
1376         (WebCore::FontGlyphs::realizeFontDataAt):
1377
1378             Reorganize a bit to make the logic clearer.
1379             Get rid of the strange cAllFamiliesScanned constant.
1380
1381         (WebCore::FontGlyphs::glyphDataForVariant):
1382         (WebCore::FontGlyphs::glyphDataForNormalVariant):
1383
1384             Loop until null, that always works.
1385
1386         * platform/graphics/FontGlyphs.h:
1387         (WebCore::FontGlyphs::loadingCustomFonts): Deleted.
1388         * platform/graphics/ios/FontCacheIOS.mm:
1389         (WebCore::FontCache::similarFontPlatformData):
1390         * platform/graphics/mac/FontCacheMac.mm:
1391         (WebCore::FontCache::similarFontPlatformData):
1392         * platform/graphics/mac/FontMac.mm:
1393         (WebCore::Font::dashesForIntersectionsWithRect):
1394
1395 2015-01-09  Csaba Osztrogonác  <ossy@webkit.org>
1396
1397         REGRESSION(r177925): It broke the !ENABLE(INSPECTOR) build
1398         https://bugs.webkit.org/show_bug.cgi?id=140098
1399
1400         Reviewed by Brian Burg.
1401
1402         * inspector/InspectorInstrumentationCookie.cpp: Removed ENABLE(INSPECTOR) guard,
1403         becaue InspectorInstrumentationCookie is used everywhere unconditionally.
1404         * inspector/InspectorInstrumentationCookie.h: Removed ENABLE(INSPECTOR) guard.
1405         * loader/appcache/ApplicationCacheGroup.h: Removed ENABLE(INSPECTOR) guard around
1406         m_currentResourceIdentifier, because it is used unconditionally in the cpp.
1407
1408 2015-01-09  Byungseon Shin  <sun.shin@lge.com>
1409
1410         [EFL] Fix crash introduced in r178029
1411         https://bugs.webkit.org/show_bug.cgi?id=140289
1412
1413         Reviewed by Martin Robinson.
1414
1415         Clearing childClippingMaskLayer of CoordinatedGraphics should be called
1416         before clearing childClippingLayer.
1417
1418         No new tests, covered by existing tests.
1419
1420         * rendering/RenderLayerBacking.cpp:
1421         (WebCore::RenderLayerBacking::~RenderLayerBacking):
1422
1423 2015-01-08  Enrica Casucci  <enrica@apple.com>
1424
1425         [iOS] Cannot paste an image URL in a plain text field in a page.
1426         https://bugs.webkit.org/show_bug.cgi?id=140274
1427         rdar://problem/18590809
1428
1429         Reviewed by Alexey Proskuryakov.
1430
1431         When we want to get plain text from the pasteboard, we
1432         should also try kUTTypeURL if there is no kUTTypeText available.
1433
1434         * WebCore.exp.in:
1435         * platform/ios/PasteboardIOS.mm:
1436         (WebCore::Pasteboard::read):
1437         * platform/ios/PlatformPasteboardIOS.mm:
1438         (WebCore::PlatformPasteboard::readString):
1439
1440 2015-01-09  Commit Queue  <commit-queue@webkit.org>
1441
1442         Unreviewed, rolling out r178154, r178163, and r178164.
1443         https://bugs.webkit.org/show_bug.cgi?id=140292
1444
1445         Still multiple assertion failures on tests (Requested by ap on
1446         #webkit).
1447
1448         Reverted changesets:
1449
1450         "Modernize and streamline HTMLTokenizer"
1451         https://bugs.webkit.org/show_bug.cgi?id=140166
1452         http://trac.webkit.org/changeset/178154
1453
1454         "Unreviewed speculative buildfix after r178154."
1455         http://trac.webkit.org/changeset/178163
1456
1457         "One more unreviewed speculative buildfix after r178154."
1458         http://trac.webkit.org/changeset/178164
1459
1460 2015-01-09  Bartlomiej Gajda  <b.gajda@samsung.com>
1461
1462         [MSE] Implement Append Window support.
1463         https://bugs.webkit.org/show_bug.cgi?id=139861
1464
1465         Reviewed by Jer Noble.
1466
1467         Implement Append Windows support for SourceBuffer as per spec.
1468         Also change order in idl to match spec order.
1469
1470         Test: media/media-source/media-source-append-buffer-with-append-window.html
1471
1472         * Modules/mediasource/SourceBuffer.cpp:
1473         (WebCore::SourceBuffer::SourceBuffer):
1474         (WebCore::SourceBuffer::appendWindowStart):
1475         (WebCore::SourceBuffer::setAppendWindowStart):
1476         (WebCore::SourceBuffer::appendWindowEnd):
1477         (WebCore::SourceBuffer::setAppendWindowEnd):
1478         (WebCore::SourceBuffer::abort):
1479         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1480         * Modules/mediasource/SourceBuffer.h:
1481         * Modules/mediasource/SourceBuffer.idl:
1482
1483 2015-01-09  Chris Fleizach  <cfleizach@apple.com>
1484
1485         AX: Crash at -[WebAccessibilityObjectWrapperBase accessibilityTitle] + 31
1486         https://bugs.webkit.org/show_bug.cgi?id=140286
1487
1488         Reviewed by Mario Sanchez Prada.
1489
1490         This is crashing because AppKit is checking if certain method names like "accessibilityTitle" exist,
1491         and then it bypasses accessibilityAttributeValue: to call directly into those methods.
1492
1493         That bypasses are safety checks. I think a safe way to avoid this is rename our methods.
1494
1495         No new tests, problem only occurs when triggered through AppKit.
1496
1497         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1498         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
1499         (-[WebAccessibilityObjectWrapper accessibilityHint]):
1500         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
1501         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1502         (-[WebAccessibilityObjectWrapperBase baseAccessibilityTitle]):
1503         (-[WebAccessibilityObjectWrapperBase baseAccessibilityDescription]):
1504         (-[WebAccessibilityObjectWrapperBase baseAccessibilityHelpText]):
1505         (-[WebAccessibilityObjectWrapperBase accessibilityTitle]): Deleted.
1506         (-[WebAccessibilityObjectWrapperBase accessibilityDescription]): Deleted.
1507         (-[WebAccessibilityObjectWrapperBase accessibilityHelpText]): Deleted.
1508         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1509         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1510
1511 2015-01-06  Philippe Normand  <pnormand@igalia.com>
1512
1513         [GStreamer][MSE] ASSERT in MediaSourceClientGStreamer::addSourceBuffer
1514         https://bugs.webkit.org/show_bug.cgi?id=140119
1515
1516         Reviewed by Carlos Garcia Campos.
1517
1518         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
1519         (WebCore::MediaSourceClientGStreamer::addSourceBuffer): Use a raw
1520         pointer for the ghost pad, its reference is then taken once attached
1521         to the parent element.
1522
1523 2015-01-09  Zan Dobersek  <zdobersek@igalia.com>
1524
1525         After r178166, ANGLE's EGL/GLES/GLES2 headers are included before the
1526         system-default headers because the Source/ThirdParty/ANGLE/include
1527         directory is searched through. This shouldn't be the case for ports
1528         which want to use system-default headers and are searching for them
1529         explicitly. To avoid that, OPENGL_INCLUDE_DIR or OPENGLES2_INCLUDE_DIR
1530         should be added to WebCore_INCLUDE_DIRECTORIES before ANGLE directories.
1531
1532         Rubber-stamped by Carlos Garcia Campos.
1533
1534         * CMakeLists.txt:
1535
1536 2015-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1537
1538         Use angle-bracket form to include external headers in WebCore
1539         https://bugs.webkit.org/show_bug.cgi?id=140288
1540
1541         Reviewed by Žan Doberšek.
1542
1543         * CMakeLists.txt:
1544         * platform/graphics/GraphicsContext.cpp:
1545         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1546         * platform/graphics/harfbuzz/HarfBuzzFace.cpp:
1547         * platform/graphics/harfbuzz/HarfBuzzFaceCoreText.cpp:
1548         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1549         * platform/graphics/mac/GraphicsContext3DMac.mm:
1550         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1551         * platform/graphics/win/GraphicsContext3DWin.cpp:
1552         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1553         * platform/image-decoders/png/PNGImageDecoder.cpp:
1554         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1555         * platform/image-encoders/JPEGImageEncoder.cpp:
1556         * platform/image-encoders/PNGImageEncoder.cpp:
1557         * platform/text/TextEncodingDetectorICU.cpp:
1558
1559 2015-01-09  Csaba Osztrogonác  <ossy@webkit.org>
1560
1561         One more unreviewed speculative buildfix after r178154.
1562
1563         * xml/parser/CharacterReferenceParserInlines.h:
1564         (WebCore::consumeCharacterReference): Remove highestValidCharacter too, it became unused after r178163.
1565
1566 2015-01-08  Csaba Osztrogonác  <ossy@webkit.org>
1567
1568         Unreviewed speculative buildfix after r178154.
1569
1570         * xml/parser/CharacterReferenceParserInlines.h:
1571         (WebCore::consumeCharacterReference): Remove unused overflow variable.
1572
1573 2015-01-08  Darin Adler  <darin@apple.com>
1574
1575         Remove strange CharacterData::dataImpl function
1576         https://bugs.webkit.org/show_bug.cgi?id=140115
1577
1578         Reviewed by Anders Carlsson.
1579
1580         Every call site could just use the data function instead.
1581
1582         * dom/CharacterData.h:
1583         (WebCore::CharacterData::dataImpl): Deleted.
1584
1585         * dom/Text.cpp:
1586         (WebCore::Text::splitText): Use data instead of dataImpl.
1587         (WebCore::Text::createTextRenderer): Ditto.
1588
1589         * rendering/RenderCombineText.cpp:
1590         (WebCore::RenderCombineText::RenderCombineText): Updated to take
1591         const String&. We missed this class when RenderText changed.
1592         * rendering/RenderCombineText.h: Ditto.
1593
1594         * style/StyleResolveTree.cpp:
1595         (WebCore::Style::updateTextRendererAfterContentChange): Use data.
1596
1597 2015-01-08  Chris Dumez  <cdumez@apple.com>
1598
1599         ASSERTION FAILED: !valueWithCalculation.calculation() in WebCore::CSSParser::validateCalculationUnit
1600         https://bugs.webkit.org/show_bug.cgi?id=140251
1601
1602         Reviewed by Darin Adler.
1603
1604         Using a calculated value for text-shadow's blur-radius was hitting an
1605         assertion in CSSParser::validateCalculationUnit() because validUnit()
1606         is called twice, first with 'FLength' unit, then more stricly with
1607         'FLength|FNonNeg' if parsing the blur-radius as it cannot be negative
1608         as per the specification:
1609         - http://dev.w3.org/csswg/css-text-decor-3/#text-shadow-property
1610         - http://dev.w3.org/csswg/css-backgrounds-3/#shadow
1611
1612         On the second call, the ValueWithCalculation's m_calculation member
1613         was already initialized and the code did not handle this. This patch
1614         updates validateCalculationUnit() to teach it to reuse the previously
1615         parsed calculation in this case. All it needs to do is to update the
1616         existing CSSCalcValue's range to allow negative values or not.
1617
1618         When writing the layout test for this, I also noticed that the CSS
1619         parser was not rejecting negative calculated values for blur-radius
1620         (only negative non-calculated ones). This is because
1621         validateCalculationUnit() was ignoring FNonNeg if the calculated
1622         value is a Length. This patch also addresses the issue.
1623
1624         Test: fast/css/text-shadow-calc-value.html
1625
1626         * css/CSSCalculationValue.h:
1627         (WebCore::CSSCalcValue::setPermittedValueRange):
1628         Add a setter to update the CSSCalculationValue's permitted value range
1629         so that the CSS parser does not need to fully reparse the calculation
1630         only to update the permitted value range.
1631
1632         * css/CSSParser.cpp:
1633         (WebCore::CSSParser::validateCalculationUnit):
1634         - Teach the code to reuse the previously parsed calculation value.
1635         - Do the FNonNeg check for Length calculations as well.
1636
1637 2015-01-08  Darin Adler  <darin@apple.com>
1638
1639         Modernize and streamline HTMLTokenizer
1640         https://bugs.webkit.org/show_bug.cgi?id=140166
1641
1642         Reviewed by Sam Weinig.
1643
1644         * html/parser/AtomicHTMLToken.h:
1645         (WebCore::AtomicHTMLToken::initializeAttributes): Removed unneeded assertions
1646         based on fields I removed.
1647
1648         * html/parser/HTMLDocumentParser.cpp:
1649         (WebCore::HTMLDocumentParser::HTMLDocumentParser): Change to use updateStateFor
1650         to set the initial state when parsing a fragment, since it implements the same
1651         rule taht the tokenizerStateForContextElement function did.
1652         (WebCore::HTMLDocumentParser::pumpTokenizer): Updated to use the revised
1653         interfaces for HTMLSourceTracker and HTMLTokenizer.
1654         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Changed to take a
1655         TokenPtr instead of an HTMLToken, so we can clear out the TokenPtr earlier
1656         for non-character tokens, and let them get cleared later for character tokens.
1657         (WebCore::HTMLDocumentParser::insert): Pass references.
1658         (WebCore::HTMLDocumentParser::append): Ditto.
1659         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan): Ditto.
1660
1661         * html/parser/HTMLDocumentParser.h: Updated argument type for constructTreeFromHTMLToken
1662         and removed now-unneeded m_token data members.
1663
1664         * html/parser/HTMLEntityParser.cpp: Removed unneeded uses of the inline keyword.
1665         (WebCore::HTMLEntityParser::consumeNamedEntity): Replaced two uses of
1666         advanceAndASSERT with just plain advance; there's really no need to assert the
1667         character is the one we just got out of the string.
1668
1669         * html/parser/HTMLInputStream.h: Moved the include of TextPosition.h here from
1670         its old location since this class has two data members that are OrdinalNumber.
1671
1672         * html/parser/HTMLMetaCharsetParser.cpp:
1673         (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser): Removed most of the
1674         initialization, since it's now done by defaults.
1675         (WebCore::extractCharset): Rewrote this to be a non-member function, and to
1676         use a for loop, and to handle quote marks in a simpler way. Also changed it
1677         to return a StringView so we don't have to allocate a new string.
1678         (WebCore::HTMLMetaCharsetParser::processMeta): Use a modern for loop, and
1679         also take a token argument since it's no longer a data member.
1680         (WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes): Use a modern for
1681         loop, StringView instead of string, and don't bother naming the local enum.
1682         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Updated for the new
1683         way of getting tokens from the tokenizer.
1684
1685         * html/parser/HTMLMetaCharsetParser.h: Got rid of some data members and
1686         tightened up the formatting a little. Don't bother allocating the tokenizer
1687         on the heap.
1688
1689         * html/parser/HTMLPreloadScanner.cpp:
1690         (WebCore::TokenPreloadScanner::TokenPreloadScanner): Removed unneeded
1691         initialization.
1692         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner): Ditto.
1693         (WebCore::HTMLPreloadScanner::scan): Changed to take a reference.
1694
1695         * html/parser/HTMLPreloadScanner.h: Removed unneeded includes, typedefs,
1696         and forward declarations. Removed explicit declaration of the destructor,
1697         since the default one works. Removed unused createCheckpoint and rewindTo
1698         functions. Gave initial values for various data members. Marked the device
1699         scale factor const beacuse it's set in the constructor and never changed.
1700         Also removed the unneeded isSafeToSendToAnotherThread.
1701
1702         * html/parser/HTMLResourcePreloader.cpp:
1703         (WebCore::PreloadRequest::isSafeToSendToAnotherThread): Deleted.
1704
1705         * html/parser/HTMLResourcePreloader.h:
1706         (WebCore::PreloadRequest::PreloadRequest): Removed unneeded calls to
1707         isolatedCopy. Also removed isSafeToSendToAnotherThread.
1708
1709         * html/parser/HTMLSourceTracker.cpp:
1710         (WebCore::HTMLSourceTracker::startToken): Renamed. Changed to keep state
1711          in the source tracker itself, not the token.
1712         (WebCore::HTMLSourceTracker::endToken): Ditto.
1713         (WebCore::HTMLSourceTracker::source): Renamed. Changed to use the state
1714         from the source tracker.
1715
1716         * html/parser/HTMLSourceTracker.h: Removed unneeded include of HTMLToken.h.
1717         Renamed functions, removed now-unneeded comment.
1718
1719         * html/parser/HTMLToken.h: Cut down on the fields used by the source tracker.
1720         It only needs to know the start and end of each attribute, not each part of
1721         each attribute. Removed setBaseOffset, setEndOffset, length, addNewAttribute,
1722         beginAttributeName, endAttributeName, beginAttributeValue, endAttributeValue,
1723         m_baseOffset and m_length. Added beginAttribute and endAttribute.
1724         (WebCore::HTMLToken::clear): No need to zero m_length or m_baseOffset any more.
1725         (WebCore::HTMLToken::length): Deleted.
1726         (WebCore::HTMLToken::setBaseOffset): Deleted.
1727         (WebCore::HTMLToken::setEndOffset): Deleted.
1728         (WebCore::HTMLToken::beginStartTag): Only null out m_currentAttribute if we
1729         are compiling in assertions.
1730         (WebCore::HTMLToken::beginEndTag): Ditto.
1731         (WebCore::HTMLToken::addNewAttribute): Deleted.
1732         (WebCore::HTMLToken::beginAttribute): Moved the code from addNewAttribute in
1733         here and set the start offset.
1734         (WebCore::HTMLToken::beginAttributeName): Deleted.
1735         (WebCore::HTMLToken::endAttributeName): Deleted.
1736         (WebCore::HTMLToken::beginAttributeValue): Deleted.
1737         (WebCore::HTMLToken::endAttributeValue): Deleted.
1738
1739         * html/parser/HTMLTokenizer.cpp:
1740         (WebCore::HTMLToken::endAttribute): Added. Sets the end offset.
1741         (WebCore::HTMLToken::appendToAttributeName): Updated assertion.
1742         (WebCore::HTMLToken::appendToAttributeValue): Ditto.
1743         (WebCore::convertASCIIAlphaToLower): Renamed from toLowerCase and changed
1744         so it's legal to call on lower case letters too.
1745         (WebCore::vectorEqualsString): Changed to take a string literal rather than
1746         a WTF::String.
1747         (WebCore::HTMLTokenizer::inEndTagBufferingState): Made this a member function.
1748         (WebCore::HTMLTokenizer::HTMLTokenizer): Updated for data member changes.
1749         (WebCore::HTMLTokenizer::bufferASCIICharacter): Added. Optimized version of
1750         bufferCharacter for the common case where we know the character is ASCII.
1751         (WebCore::HTMLTokenizer::bufferCharacter): Moved this function here from the
1752         header since it's only used inside the class.
1753         (WebCore::HTMLTokenizer::emitAndResumeInDataState): Moved this here, renamed
1754         it and removed the state argument.
1755         (WebCore::HTMLTokenizer::emitAndReconsumeInDataState): Ditto.
1756         (WebCore::HTMLTokenizer::emitEndOfFile): More of the same.
1757         (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded): Ditto.
1758         (WebCore::HTMLTokenizer::haveBufferedCharacterToken): Ditto.
1759         (WebCore::HTMLTokenizer::flushBufferedEndTag): Updated since m_token is now
1760         the actual token, not just a pointer.
1761         (WebCore::HTMLTokenizer::flushEmitAndResumeInDataState): Renamed this and
1762         removed the state argument.
1763         (WebCore::HTMLTokenizer::processToken): This function, formerly nextToken,
1764         is now the internal function used by nextToken. Updated its contents to use
1765         simpler macros, changed code to set m_state when returning, rather than
1766         constantly setting it when cycling through states, switched style to use
1767         early return/goto rather than lots of else statements, took out unneeded
1768         braces now that BEGIN/END_STATE handles the braces, collapsed upper and
1769         lower case letter handling in many states, changed lookAhead call sites to
1770         use the new advancePast function instead.
1771         (WebCore::HTMLTokenizer::updateStateFor): Set m_state directly instead of
1772         calling a setstate function.
1773         (WebCore::HTMLTokenizer::appendToTemporaryBuffer): Moved here from header.
1774         (WebCore::HTMLTokenizer::temporaryBufferIs): Changed argument type to
1775         a literal instead of a WTF::String.
1776         (WebCore::HTMLTokenizer::appendToPossibleEndTag): Renamed and changed type
1777         to be a UChar instead of LChar, although all characters will be ASCII.
1778         (WebCore::HTMLTokenizer::isAppropriateEndTag): Marked const, and changed
1779         type from size_t to unsigned.
1780
1781         * html/parser/HTMLTokenizer.h: Changed interface of nextToken so it returns
1782         a TokenPtr so code doesn't have to understand special rules about when to
1783         work with an HTMLToken and when to clear it. Made most functions private,
1784         and made the State enum private as well. Replaced the state and setState
1785         functions with more specific functions for the few states we need to deal
1786         with outside the class. Moved function bodies outside the class definition
1787         so it's easier to read the class definition.
1788
1789         * html/parser/HTMLTreeBuilder.cpp:
1790         (WebCore::HTMLTreeBuilder::processStartTagForInBody): Updated to use the
1791         new set state functions instead of setState.
1792         (WebCore::HTMLTreeBuilder::processEndTag): Ditto.
1793         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
1794         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
1795         (WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.
1796
1797         * html/parser/InputStreamPreprocessor.h: Marked the constructor explicit,
1798         and mde it take a reference rather than a pointer.
1799
1800         * html/parser/TextDocumentParser.cpp:
1801         (WebCore::TextDocumentParser::insertFakePreElement): Updated to use the
1802         new set state functions instead of setState.
1803
1804         * html/parser/XSSAuditor.cpp:
1805         (WebCore::XSSAuditor::decodedSnippetForName): Updated for name change.
1806         (WebCore::XSSAuditor::decodedSnippetForAttribute): Updated for changes to
1807         attribute range tracking.
1808         (WebCore::XSSAuditor::decodedSnippetForJavaScript): Updated for name change.
1809         (WebCore::XSSAuditor::isSafeToSendToAnotherThread): Deleted.
1810
1811         * html/parser/XSSAuditor.h: Deleted isSafeToSendToAnotherThread.
1812
1813         * html/track/WebVTTTokenizer.cpp: Removed the local state variable from
1814         WEBVTT_ADVANCE_TO; there is no need for it.
1815         (WebCore::WebVTTTokenizer::WebVTTTokenizer): Use a reference instead of a
1816         pointer for the preprocessor.
1817         (WebCore::WebVTTTokenizer::nextToken): Ditto. Also removed the state local
1818         variable and the switch statement, replacing with labels instead since we
1819         go between states with goto.
1820
1821         * platform/text/SegmentedString.cpp:
1822         (WebCore::SegmentedString::operator=): Changed the return type to be non-const
1823         to match normal C++ design rules.
1824         (WebCore::SegmentedString::pushBack): Renamed from prepend since this is not a
1825         general purpose prepend function. Also fixed assertions to not use the strangely
1826         named "escaped" function, since we are deleting it.
1827         (WebCore::SegmentedString::append): Ditto.
1828         (WebCore::SegmentedString::advancePastNonNewlines): Renamed from advance, since
1829         the function only works for non-newlines.
1830         (WebCore::SegmentedString::currentColumn): Got rid of unneeded local variable.
1831         (WebCore::SegmentedString::advancePastSlowCase): Moved here from header and
1832         renamed. This function now consumes the characters if they match.
1833
1834         * platform/text/SegmentedString.h: Made the changes mentioned above.
1835         (WebCore::SegmentedString::excludeLineNumbers): Deleted.
1836         (WebCore::SegmentedString::advancePast): Renamed from lookAhead. Also changed
1837         behavior so the characters are consumed.
1838         (WebCore::SegmentedString::advancePastIgnoringCase): Ditto.
1839         (WebCore::SegmentedString::advanceAndASSERT): Deleted.
1840         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase): Deleted.
1841         (WebCore::SegmentedString::escaped): Deleted.
1842
1843         * xml/parser/CharacterReferenceParserInlines.h:
1844         (WebCore::isHexDigit): Deleted.
1845         (WebCore::unconsumeCharacters): Updated for name change.
1846         (WebCore::consumeCharacterReference): Removed unneeded name for local enum,
1847         renamed local variable "cc" to character. Changed code to use helpers like
1848         isASCIIAlpha and toASCIIHexValue. Removed unneeded use of advanceAndASSERT,
1849         since we don't really need to assert the character we just extracted.
1850
1851         * xml/parser/MarkupTokenizerInlines.h:
1852         (WebCore::isTokenizerWhitespace): Renamed argument to character.
1853         (WebCore::advanceStringAndASSERTIgnoringCase): Deleted.
1854         (WebCore::advanceStringAndASSERT): Deleted.
1855         Changed all the macro implementations so they set m_state only when
1856         returning from the function and just use goto inside the state machine.
1857
1858 2015-01-08  Benjamin Poulain  <benjamin@webkit.org>
1859
1860         Build fix after r178151
1861
1862         * contentextensions/DFA.cpp:
1863         (WebCore::ContentExtensions::DFA::actions):
1864
1865 2015-01-08  Benjamin Poulain  <benjamin@webkit.org>
1866
1867         [WK2] Start a prototype for declarative site specific extensions
1868         https://bugs.webkit.org/show_bug.cgi?id=140160
1869
1870         Reviewed by Andreas Kling.
1871
1872         Currently, clients have various ways to execute custom code for certain URLs.
1873         Each of those mechanism implies messaging the UIProcess, executing some code
1874         calling back to the WebProcess, then actually load the resource.
1875         All this back and forth introduces delays before we actually load resources.
1876
1877         Since the set of actions is done per site is actually simple and limited,
1878         it may be possible to do everything in WebCore and shortcut the defered loading.
1879
1880         This patch provides the starting point for this idea. The "rules" (currently just blocking)
1881         are be passed to WebCore in a JSON format. In WebCore, we create a state
1882         machine to match the rules and we execute the action when the state machine tells
1883         us to.
1884
1885         * WebCore.exp.in:
1886         * WebCore.xcodeproj/project.pbxproj:
1887         * contentextensions/ContentExtensionRule.cpp: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1888         (WebCore::ContentExtensions::ContentExtensionRule::ContentExtensionRule):
1889         * contentextensions/ContentExtensionRule.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1890         (WebCore::ContentExtensions::ContentExtensionRule::trigger):
1891         (WebCore::ContentExtensions::ContentExtensionRule::action):
1892         * contentextensions/ContentExtensionsBackend.cpp: Added.
1893         (WebCore::ContentExtensions::ContentExtensionsBackend::sharedInstance):
1894         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
1895         (WebCore::ContentExtensions::ContentExtensionsBackend::removeRuleList):
1896         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
1897         * contentextensions/ContentExtensionsBackend.h: Added.
1898         * contentextensions/ContentExtensionsInterface.cpp: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1899         (WebCore::ContentExtensions::shouldBlockURL):
1900         * contentextensions/ContentExtensionsInterface.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1901         * contentextensions/ContentExtensionsManager.cpp: Added.
1902         (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
1903         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
1904         (WebCore::ContentExtensions::ExtensionsManager::loadRule):
1905         (WebCore::ContentExtensions::ExtensionsManager::loadExtension):
1906         * contentextensions/ContentExtensionsManager.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1907         * contentextensions/DFA.cpp: Added.
1908         (WebCore::ContentExtensions::DFA::DFA):
1909         (WebCore::ContentExtensions::DFA::operator=):
1910         (WebCore::ContentExtensions::DFA::nextState):
1911         (WebCore::ContentExtensions::DFA::actions):
1912         (WebCore::ContentExtensions::DFA::debugPrintDot):
1913         * contentextensions/DFA.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1914         (WebCore::ContentExtensions::DFA::root):
1915         * contentextensions/DFANode.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1916         * contentextensions/NFA.cpp: Added.
1917         (WebCore::ContentExtensions::NFA::NFA):
1918         (WebCore::ContentExtensions::NFA::createNode):
1919         (WebCore::ContentExtensions::NFA::addTransition):
1920         (WebCore::ContentExtensions::NFA::addEpsilonTransition):
1921         (WebCore::ContentExtensions::NFA::setFinal):
1922         (WebCore::ContentExtensions::NFA::debugPrintDot):
1923         * contentextensions/NFA.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1924         (WebCore::ContentExtensions::NFA::root):
1925         * contentextensions/NFANode.cpp: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1926         (WebCore::ContentExtensions::NFANode::NFANode):
1927         * contentextensions/NFANode.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1928         * contentextensions/NFAToDFA.cpp: Added.
1929         (WebCore::ContentExtensions::epsilonClosure):
1930         (WebCore::ContentExtensions::setTransitionsExcludingEpsilon):
1931         (WebCore::ContentExtensions::HashableNodeIdSet::HashableNodeIdSet):
1932         (WebCore::ContentExtensions::HashableNodeIdSet::operator=):
1933         (WebCore::ContentExtensions::HashableNodeIdSet::isEmptyValue):
1934         (WebCore::ContentExtensions::HashableNodeIdSet::isDeletedValue):
1935         (WebCore::ContentExtensions::HashableNodeIdSet::nodeIdSet):
1936         (WebCore::ContentExtensions::HashableNodeIdSetHash::hash):
1937         (WebCore::ContentExtensions::HashableNodeIdSetHash::equal):
1938         (WebCore::ContentExtensions::addDFAState):
1939         (WebCore::ContentExtensions::NFAToDFA::convert):
1940         * contentextensions/NFAToDFA.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
1941         * loader/cache/CachedResourceLoader.cpp:
1942         (WebCore::CachedResourceLoader::requestResource):
1943
1944 2015-01-08  Benjamin Poulain  <bpoulain@apple.com>
1945
1946         Make better use of the stack when compiling selectors
1947         https://bugs.webkit.org/show_bug.cgi?id=139615
1948         rdar://problem/19226482
1949
1950         Reviewed by Andreas Kling.
1951
1952         Selectors used to be only on one level. To avoid memory allocations, we were allocating
1953         a lot of stack upfront and we were using that to create all the intermediary objects
1954         used by the code generator.
1955
1956         Then, selectors became multilevel. We now support arbitrary nesting of selector lists.
1957
1958         We did not adapt any of the structures and the creation of the intermediary object is recursive.
1959         This resulted in over 1k of stack allocation at every level, quickly accumulating to unreasonable
1960         numbers.
1961
1962         This patch fixes this problem by making each stack frame of the recursion much lighter.
1963         We no longer allocate the big objects (SelectorFragment and SelectorFragmentList) on the stack.
1964
1965         In each case where we would have used a Stack allocated SelectorFragment or SelectorFragmentList,
1966         we now allocate the memory directly into the target vector.
1967
1968         In the cases where the object should not be on the vector, we simply remove it. Those are uncommon
1969         cases so that should not be too bad.
1970
1971         Tests: fast/selectors/matches-selector-list-ending-with-never-matching-selectors.html
1972                fast/selectors/not-selector-list-ending-with-never-matching-selectors.html
1973                fast/selectors/nth-child-of-selector-list-ending-with-never-matching-selectors.html
1974                fast/selectors/nth-last-child-of-selector-list-ending-with-never-matching-selectors.html
1975
1976         * cssjit/SelectorCompiler.cpp:
1977         SelectorFragmentList is also used for nested lists. Keeping 32 SelectorFragment preallocated
1978         for each nested list is way too big.
1979
1980         (WebCore::SelectorCompiler::addPseudoClassType):
1981         There are three cases of nested selector lists supported by the compiler: :matches(), :not()
1982         and :nth-child(). For those 3 cases, use the target vector memory instead of the stack.
1983
1984         (WebCore::SelectorCompiler::constructFragmentsInternal):
1985         (WebCore::SelectorCompiler::constructFragments):
1986         Make sure we do not modify the input list on failure since it may be reused.
1987
1988         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1989         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesMatchesPseudoClass):
1990         I changed the handling of :nth-child(An+B of selectorList) to not generate empty filters.
1991         With that we can generalize the assertion to generateElementMatchesSelectorList() and simplify
1992         the flow of selector lists a bit.
1993
1994 2015-01-08  Chris Dumez  <cdumez@apple.com>
1995
1996         Move '-webkit-font-feature-settings' CSS property to the new StyleBuilder
1997         https://bugs.webkit.org/show_bug.cgi?id=140267
1998
1999         Reviewed by Andreas Kling.
2000
2001         Move '-webkit-font-feature-settings' CSS property to the new
2002         StyleBuilder.
2003
2004         * css/CSSPropertyNames.in:
2005         * css/StyleBuilderConverter.h:
2006         (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
2007         * css/StyleBuilderCustom.h:
2008         (WebCore::StyleBuilderCustom::applyInitialWebkitFontFeatureSettings):
2009         (WebCore::StyleBuilderCustom::applyInheritWebkitFontFeatureSettings):
2010         * css/StyleResolver.cpp:
2011         (WebCore::StyleResolver::applyProperty):
2012         * platform/graphics/FontDescription.cpp:
2013         (WebCore::FontDescription::makeNormalFeatureSettings): Deleted.
2014         * platform/graphics/FontDescription.h:
2015
2016 2015-01-08  Brent Fulgham  <bfulgham@apple.com>
2017
2018         [Win] Build fix after r178133.
2019
2020         * platform/graphics/FontCache.h: Correct declaration of fontDataFromDescriptionAndLogFont
2021         * platform/graphics/SimpleFontData.h: We still need 'platformDestroy'
2022         * platform/graphics/mac/SimpleFontDataMac.mm:
2023         (WebCore::SimpleFontData::platformDestroy): Add stub back to prevent build break.
2024         * platform/graphics/win/FontCacheWin.cpp:
2025         (WebCore::FontCache::fontDataFromDescriptionAndLogFont): Correct signature.
2026         (WebCore::FontCache::lastResortFallbackFont): Correct '::' syntax.
2027         (WebCore::FontCache:lastResortFallbackFont): Deleted.
2028
2029 2015-01-08  Antti Koivisto  <antti@apple.com>
2030
2031         Remove the concept of "retained" font
2032         https://bugs.webkit.org/show_bug.cgi?id=140246
2033
2034         Reviewed by Darin Adler.
2035
2036         FontCache currently maintains a secondary refcount for SimpleFontDatas. This is used to decide whether
2037         a font is considered inactive and is eligible for purging. This is confusing and complex.
2038
2039         The new scheme in this patch considers fonts in font cache inactive if their refcount is 1 (they are
2040         owned by the cache only). This simplifies the code and gives similar behavior. Types that "retained" the
2041         font this way always also ref it.
2042
2043         We also avoid unnecessarily removing fonts that wouldn't get deleted from the cache.
2044
2045         Also modernized some names and code.
2046
2047         * WebCore.exp.in:
2048         * css/CSSFontFaceSource.cpp:
2049         (WebCore::CSSFontFaceSource::getFontData):
2050         * css/CSSFontSelector.cpp:
2051         (WebCore::CSSFontSelector::getFontData):
2052         (WebCore::CSSFontSelector::getFallbackFontData):
2053         * platform/graphics/FontCache.cpp:
2054         (WebCore::fontPlatformDataCache):
2055         (WebCore::FontCache::getCachedFontPlatformData):
2056         (WebCore::cachedFonts):
2057         (WebCore::FontCache::fontForFamily):
2058         (WebCore::FontCache::fontDataForPlatformData):
2059         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
2060         (WebCore::FontCache::purgeInactiveFontData):
2061         (WebCore::FontCache::fontDataCount):
2062         (WebCore::FontCache::inactiveFontDataCount):
2063         (WebCore::FontCache::fontForFamilyAtIndex):
2064         (WebCore::FontCache::invalidate):
2065         (WebCore::FontCache::getCachedFontData): Deleted.
2066         (WebCore::FontCache::getNonRetainedLastResortFallbackFont): Deleted.
2067         (WebCore::FontCache::releaseFontData): Deleted.
2068         (WebCore::FontCache::getFontData): Deleted.
2069         * platform/graphics/FontCache.h:
2070         * platform/graphics/FontGlyphs.cpp:
2071         (WebCore::FontGlyphs::FontGlyphs):
2072         (WebCore::FontGlyphs::~FontGlyphs):
2073         (WebCore::FontGlyphs::realizeFontDataAt):
2074         (WebCore::FontGlyphs::releaseFontData): Deleted.
2075         * platform/graphics/FontGlyphs.h:
2076         (WebCore::FontGlyphs::~FontGlyphs): Deleted.
2077         * platform/graphics/SimpleFontData.cpp:
2078         (WebCore::SimpleFontData::~SimpleFontData):
2079         * platform/graphics/SimpleFontData.h:
2080         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2081         (WebCore::SimpleFontData::platformDestroy): Deleted.
2082         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2083         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2084         * platform/graphics/mac/FontCacheMac.mm:
2085         (WebCore::FontCache::systemFallbackForCharacters):
2086         (WebCore::FontCache::similarFontPlatformData):
2087         (WebCore::FontCache::lastResortFallbackFont):
2088         (WebCore::FontCache::getLastResortFallbackFont): Deleted.
2089         * platform/graphics/mac/SimpleFontDataMac.mm:
2090         (WebCore::SimpleFontData::platformCreateScaledFontData):
2091         (WebCore::SimpleFontData::platformDestroy): Deleted.
2092
2093 2015-01-08  Anders Carlsson  <andersca@apple.com>
2094
2095         Remove AbstractSQLTransaction
2096         https://bugs.webkit.org/show_bug.cgi?id=140265
2097
2098         Reviewed by Tim Horton.
2099
2100         * Modules/webdatabase/AbstractSQLTransaction.h: Removed.
2101         * Modules/webdatabase/DatabaseBackend.cpp:
2102         * Modules/webdatabase/SQLTransaction.cpp:
2103         (WebCore::SQLTransaction::~SQLTransaction):
2104         * Modules/webdatabase/SQLTransaction.h:
2105         * Modules/webdatabase/SQLTransactionBackend.cpp:
2106         (WebCore::SQLTransactionBackend::create):
2107         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
2108         * Modules/webdatabase/SQLTransactionBackend.h:
2109         * WebCore.xcodeproj/project.pbxproj:
2110
2111 2015-01-08  Brent Fulgham  <bfulgham@apple.com>
2112
2113         [Win] Unreviewed build fix after r178124.
2114
2115         Remove uses of the removed applicationChromeMode method.
2116
2117         * rendering/RenderThemeWin.cpp:
2118         (WebCore::RenderThemeWin::getThemeData):
2119         (WebCore::RenderThemeWin::paintMenuList):
2120
2121 2015-01-08  Anders Carlsson  <andersca@apple.com>
2122
2123         Remove AbstractSQLTransactionBackend
2124         https://bugs.webkit.org/show_bug.cgi?id=140227
2125
2126         Reviewed by Darin Adler.
2127
2128         * Modules/webdatabase/AbstractSQLTransaction.h:
2129         * Modules/webdatabase/AbstractSQLTransactionBackend.h: Removed.
2130         * Modules/webdatabase/SQLStatementBackend.cpp:
2131         * Modules/webdatabase/SQLTransaction.cpp:
2132         (WebCore::SQLTransaction::setBackend):
2133         * Modules/webdatabase/SQLTransaction.h:
2134         * Modules/webdatabase/SQLTransactionBackend.h:
2135         * WebCore.xcodeproj/project.pbxproj:
2136
2137 2015-01-08  Darin Adler  <darin@apple.com>
2138
2139         ASSERTION FAILED: character != kEndOfFileMarker in WebCore::HTMLTokenizer::bufferCharacter
2140         https://bugs.webkit.org/show_bug.cgi?id=140179
2141
2142         Reviewed by Anders Carlsson.
2143
2144         Test: fast/parser/numeric-entities.html
2145
2146         * html/parser/HTMLEntityParser.cpp:
2147         (WebCore::HTMLEntityParser::legalEntityFor): Merged adjustEntity logic in here.
2148         Since the type UChar32 is a signed integer, need to check for <= 0, not just 0.
2149         This <= change alone would have fixed the bug.
2150
2151         * xml/parser/CharacterReferenceParserInlines.h:
2152         (WebCore::consumeCharacterReference): Added overflow checking when parsing hex
2153         and decimal character references. This change alone would also have fixed the
2154         bug, but in addition it makes overflow cases reliably generate replacement
2155         characters rather than ignoring the overflow and producing seemingly random
2156         characters. Test cases cover the original reported bug and other overflow cases.
2157
2158 2015-01-08  Dean Jackson  <dino@apple.com>
2159
2160         Text not drawn or white-on-white for "Close Page"/"Go Back" button on safe browsing warning page
2161         https://bugs.webkit.org/show_bug.cgi?id=140232
2162         <rdar://problem/19371010>
2163
2164         Reviewed by Anders Carlsson.
2165
2166         We need to support default button styling even when application chrome
2167         mode is not enabled (it was a bit weird that this was exposed as a Setting
2168         anyway). We should render as a default button whenever content sets
2169         the proprietary -webkit-appearance. This means we don't need the
2170         applicationChromeMode setting.
2171
2172         For normal Web content there should be no change in behavior.
2173
2174         * page/Settings.in: Remove applicationChromeMode
2175         * rendering/RenderTheme.cpp:
2176         (WebCore::RenderTheme::isDefault): Don't test for the setting.
2177
2178 2015-01-08  Chris Dumez  <cdumez@apple.com>
2179
2180         Unfriend StyleResolver and StyleBuilderCustom
2181         https://bugs.webkit.org/show_bug.cgi?id=140247
2182
2183         Reviewed by Darin Adler.
2184
2185         Stop marking StyleBuilderCustom as a friend of StyleResolver by
2186         refactoring the code a bit.
2187
2188         * css/StyleBuilderCustom.h:
2189         (WebCore::StyleBuilderCustom::applyValueFont):
2190         * css/StyleResolver.cpp:
2191         (WebCore::StyleResolver::applyFont):
2192         * css/StyleResolver.h:
2193         (WebCore::StyleResolver::documentSettings):
2194
2195 2015-01-08  Gwang Yoon Hwang  <yoon@igalia.com>
2196
2197         [CoordinatedGraphics] Update fixedVisibleContentRect only it is actually changed
2198         https://bugs.webkit.org/show_bug.cgi?id=140244
2199
2200         Reviewed by Martin Robinson.
2201
2202         CompositingCoordinator::setVisibleContentsRect already knows whether the
2203         rect has been changed. Therefore, there is no need to call
2204         FrameView::setFixedVisibleContentRect every time.
2205
2206         No new tests, covered by existing tests.
2207
2208         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
2209         (WebCore::CompositingCoordinator::setVisibleContentsRect):
2210
2211 2015-01-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2212
2213         REGRESSION(r177637) [HarfBuzz][GTK][EFL] It made 3 performance tests crash and +24 layout tests crashes/failures
2214         https://bugs.webkit.org/show_bug.cgi?id=139905
2215
2216         Reviewed by Antti Koivisto.
2217
2218         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2219         (WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Fallback to
2220         primary font data for missing glyphs.
2221
2222 2015-01-08  Myles C. Maxfield  <mmaxfield@apple.com>
2223
2224         Borders inside box-decoration-break: clone after a br do not contribute to line breaking
2225         https://bugs.webkit.org/show_bug.cgi?id=140238
2226
2227         Reviewed by Darin Adler.
2228
2229         When we iterate through renderers for line breaking, we determine which of the renderers
2230         is responsible for inserting its parent's border width. However, this determination didn't
2231         take a <br> and box-decoration-break: clone into account.
2232
2233         Test: fast/box-decoration-break/box-decoration-break-clone-line-break.html
2234
2235         * rendering/line/BreakingContextInlineHeaders.h:
2236         (WebCore::shouldAddBorderPaddingMargin):
2237         (WebCore::previousInFlowSibling): Clean up to use a do / while block.
2238
2239 2015-01-08  Gwang Yoon Hwang  <yoon@igalia.com>
2240
2241         [GTK] Seperate updateBackingStore from flushCompositingState.
2242         https://bugs.webkit.org/show_bug.cgi?id=136887
2243
2244         Reviewed by Žan Doberšek.
2245
2246         When LayerTreeHostGtk flushes pending layer changes, it updates backing
2247         stores using same loop. This makes requesting layer flush during
2248         flushing in certain condition which causes a assertion failure.
2249
2250         Animated GIF's animations are drived by the painting cycle,
2251         GraphicsLayerTextureMapper::updateBackingStoreIfNeeded would request
2252         scheduleLayerFlush during flushing layers, if animated GIF needs to
2253         advance its frame immediately. It doesn't mean the advanced frame should
2254         be painted in this painting phase. This frame advancing happens after
2255         painting a current frame to the backing store. It means the advanced
2256         frame should be painted ASAP without using its frame timer.
2257
2258         This patch seperates updateBackingStore from flushCompositingState
2259         to avoid above behavior.
2260
2261         No new tests. The bug is timing-dependent.
2262
2263         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2264         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
2265         (WebCore::toGraphicsLayerTextureMapper):
2266         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
2267         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2268
2269 2015-01-07  Chris Dumez  <cdumez@apple.com>
2270
2271         Move -webkit-tap-highlight-color / -webkit-overflow-scrolling / -webkit-touch-callout to the new StyleBuilder
2272         https://bugs.webkit.org/show_bug.cgi?id=140219
2273
2274         Reviewed by Darin Adler.
2275
2276         Move -webkit-tap-highlight-color / -webkit-overflow-scrolling /
2277         -webkit-touch-callout to the new StyleBuilder.
2278
2279         * css/CSSGradientValue.cpp:
2280         (WebCore::CSSGradientValue::gradientWithStylesResolved):
2281         * css/CSSPropertyNames.in:
2282         * css/SVGCSSStyleSelector.cpp:
2283         (WebCore::StyleResolver::applySVGProperty):
2284         * css/StyleBuilderConverter.h:
2285         (WebCore::StyleBuilderConverter::convertTouchCallout):
2286         (WebCore::StyleBuilderConverter::convertTapHighlightColor):
2287         (WebCore::StyleBuilderConverter::convertOverflowScrolling):
2288         * css/StyleResolver.cpp:
2289         (WebCore::StyleResolver::applyProperty):
2290         (WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement):
2291         (WebCore::StyleResolver::colorFromPrimitiveValue):
2292         (WebCore::StyleResolver::createFilterOperations):
2293         * css/StyleResolver.h:
2294
2295 2015-01-07  Brian J. Burg  <burg@cs.washington.edu>
2296
2297         Web Inspector: Editing Inline Styles Not Working
2298         https://bugs.webkit.org/show_bug.cgi?id=140239
2299
2300         Reviewed by Joseph Pecoraro.
2301
2302         Fix a regression introduced in r178060, where we no longer set
2303         m_ordinal in InspectorCSSId. The original refactoring should have
2304         passed m_ordinal. Fix this and introduce a sensible default value.
2305
2306         * inspector/InspectorStyleSheet.h:
2307         (WebCore::InspectorCSSId::InspectorCSSId):
2308
2309 2015-01-07  Chris Dumez  <cdumez@apple.com>
2310
2311         Assert should never be reached hit in WebCore::CSSCalcPrimitiveValue::doubleValue
2312         https://bugs.webkit.org/show_bug.cgi?id=140180
2313
2314         Reviewed by Darin Adler.
2315
2316         Add support for using floating-point angles with 'turn' unit, as per the
2317         specification:
2318         http://dev.w3.org/csswg/css-values-3/#angles
2319
2320         Previously, we only supported integer values for the 'turn' unit even
2321         though other angle units (e.g. 'deg') handle floating-point values just
2322         fine. Trying to use a floating-point value with 'turn' unit would cause
2323         us to hit an assertion in CSSCalcPrimitiveValue::doubleValue().
2324
2325         Also fix the support for angles in calc().
2326         CSSPrimitiveValue::computeDegrees() was accessing m_primitiveUnitType
2327         member directly, which would be incorrect in the case of calculated
2328         values. This patch switches to calling CSSPrimitiveValue::primitiveType()
2329         which handles calculated values.
2330
2331         Test: fast/css/turn-angle-double.html
2332
2333         * css/CSSCalculationValue.cpp:
2334         (WebCore::hasDoubleValue):
2335         * css/CSSPrimitiveValue.cpp:
2336         (WebCore::CSSPrimitiveValue::computeDegrees):
2337
2338 2015-01-07  Chris Dumez  <cdumez@apple.com>
2339
2340         Move 'font' CSS property to the new StyleBuilder
2341         https://bugs.webkit.org/show_bug.cgi?id=140181
2342
2343         Reviewed by Darin Adler.
2344
2345         Move 'font' CSS property to the new StyleBuilder.
2346
2347 2015-01-07  Chris Dumez  <cdumez@apple.com>
2348
2349         Move '-webkit-dashboard-region' CSS property to the new StyleBuilder
2350         https://bugs.webkit.org/show_bug.cgi?id=140204
2351
2352         Reviewed by Darin Adler.
2353
2354         Move '-webkit-dashboard-region' CSS property to the new StyleBuilder.
2355
2356         * css/CSSPropertyNames.in:
2357         * css/StyleBuilderCustom.h:
2358         (WebCore::convertToIntLength):
2359         (WebCore::StyleBuilderCustom::applyValueWebkitDashboardRegion):
2360         * css/StyleResolver.cpp:
2361         (WebCore::StyleResolver::applyProperty):
2362         (WebCore::convertToIntLength): Deleted.
2363
2364 2015-01-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
2365
2366         The ASCII decoding for non ASCII character is incorrect if this character comes after going through the fast decoding code path and before the end of the text by less than a machine word size of characters.
2367         https://bugs.webkit.org/show_bug.cgi?id=140173.
2368
2369         Reviewed by Darin Adler.
2370
2371         Tests: fast/encoding/char-after-fast-path-ascii-decoding.html.
2372
2373         * platform/text/TextCodecLatin1.cpp:
2374         (WebCore::TextCodecLatin1::decode):
2375         This function has a bug when it goes through the fast decoding code path. After copying
2376         one or more all ASCII MachineWords from source to the destination, the following byte
2377         is copied as is from the source to the destination even if it is non ASCII byte. This
2378         causes the decoded bytes to be incorrect. The fix is to ensure that the current byte
2379         is still ASCII after exiting the fast decoding code path.
2380  
2381 2015-01-07  Shivakumar JM  <shiva.jm@samsung.com>
2382
2383         HTMLSelectElement and HTMLOptionsCollection add() method should support index as second argument.
2384         https://bugs.webkit.org/show_bug.cgi?id=139179
2385
2386         Reviewed by Darin Adler.
2387
2388         HTMLSelectElement and HTMLOptionsCollection add() method should support index as second argument as per specification
2389         http://www.w3.org/html/wg/drafts/html/master/forms.html#the-select-element.
2390         Also this matches the behavior of Chrome and FireFox.
2391
2392         Tests: fast/dom/HTMLSelectElement/add.html
2393                fast/dom/HTMLSelectElement/options-collection-add.html
2394
2395         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2396         (WebCore::JSHTMLOptionsCollection::add): Deleted.
2397         * html/HTMLOptionsCollection.cpp:
2398         (WebCore::HTMLOptionsCollection::add):
2399         * html/HTMLOptionsCollection.h:
2400         * html/HTMLOptionsCollection.idl:
2401         * html/HTMLSelectElement.cpp:
2402         (WebCore::HTMLSelectElement::add):
2403         * html/HTMLSelectElement.h:
2404         * html/HTMLSelectElement.idl:
2405
2406 2015-01-07  Gwang Yoon Hwang  <yoon@igalia.com>
2407
2408         [GTK][ThreadedCompositor] Add support for threaded compositor.
2409         https://bugs.webkit.org/show_bug.cgi?id=118265
2410
2411         Reviewed by Martin Robinson.
2412
2413         * PlatformGTK.cmake:
2414         Adds CoodinatedGraphics and threaded compositor related classes to
2415         support threaded compositor
2416
2417         * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
2418         * platform/graphics/texmap/coordinated/CoordinatedTile.h:
2419         This class should be guarded by COORDINATED_GRAPHICS instead of
2420         TILED_BACKING_STORE
2421
2422 2015-01-07  Daniel Bates  <dabates@apple.com>
2423
2424         [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
2425         https://bugs.webkit.org/show_bug.cgi?id=137371
2426
2427         Reviewed by David Kilzer.
2428
2429         * WebCore.xcodeproj/project.pbxproj:
2430         * platform/spi/GraphicsServicesSPI.h: Added.
2431         * platform/spi/cocoa/QuartzCoreSPI.h: Add CALayer SPI property hitTestsAsOpaque.
2432         * platform/spi/cocoa/ServersSPI.h: Added.
2433 2015-01-07  Commit Queue  <commit-queue@webkit.org>
2434
2435         Unreviewed, rolling out r178068.
2436         https://bugs.webkit.org/show_bug.cgi?id=140235
2437
2438         Breaks the iOS build (Requested by enrica on #webkit).
2439
2440         Reverted changeset:
2441
2442         "[iOS] Make WebKit2 build with public iOS SDK and more build
2443         fixes for DRT"
2444         https://bugs.webkit.org/show_bug.cgi?id=137371
2445         http://trac.webkit.org/changeset/178068
2446
2447 2015-01-07  Enrica Casucci  <enrica@apple.com>
2448
2449         Can't copy URL for images and paste it into plain text fields.
2450         https://bugs.webkit.org/show_bug.cgi?id=140230
2451         rdar://problem/18736680
2452
2453         Reviewed by Dan Bernstein.
2454
2455         The incorrect objective C type was being written to the pasteboard.
2456
2457         * platform/ios/PlatformPasteboardIOS.mm:
2458         (WebCore::PlatformPasteboard::write):
2459
2460 2015-01-07  Anders Carlsson  <andersca@apple.com>
2461
2462         Fix build.
2463
2464         * Modules/webdatabase/SQLStatementBackend.cpp:
2465
2466 2015-01-07  Daniel Bates  <dabates@apple.com>
2467
2468         [iOS] Make WebKit2 build with public iOS SDK and more build fixes for DRT
2469         https://bugs.webkit.org/show_bug.cgi?id=137371
2470
2471         Reviewed by David Kilzer.
2472
2473         * WebCore.xcodeproj/project.pbxproj:
2474         * platform/spi/GraphicsServicesSPI.h: Added.
2475         * platform/spi/cocoa/QuartzCoreSPI.h: Add CALayer SPI property hitTestsAsOpaque.
2476         * platform/spi/cocoa/ServersSPI.h: Added.
2477 2015-01-07  Jaehun Lim  <ljaehun.lim@samsung.com>
2478
2479         ASSERTION FAILED: !lengthOrPercentageValue.isUndefined() in WebCore::ApplyPropertyTextIndent::applyValue
2480         https://bugs.webkit.org/show_bug.cgi?id=130341
2481
2482         Reviewed by Chris Dumez.
2483
2484         Replace ASSERT() with 'if' statement because 'ex' unit length in <title> is not defined.
2485
2486         Test: fast/css3-text/css3-text-indent/text-indent-crash-in-title.html
2487
2488         * css/StyleBuilderCustom.h:
2489         (WebCore::StyleBuilderCustom::applyValueTextIndent): Change ASSERT() to 'if' statement.
2490
2491 2015-01-07  Anders Carlsson  <andersca@apple.com>
2492
2493         Remove AbstractSQLStatement
2494         https://bugs.webkit.org/show_bug.cgi?id=140223
2495
2496         Reviewed by Sam Weinig.
2497
2498         * Modules/webdatabase/AbstractSQLStatement.h: Removed.
2499         * Modules/webdatabase/AbstractSQLTransactionBackend.h:
2500         * Modules/webdatabase/SQLStatement.h:
2501         * Modules/webdatabase/SQLStatementBackend.cpp:
2502         (WebCore::SQLStatementBackend::create):
2503         (WebCore::SQLStatementBackend::SQLStatementBackend):
2504         (WebCore::SQLStatementBackend::frontend):
2505         * Modules/webdatabase/SQLStatementBackend.h:
2506         * Modules/webdatabase/SQLTransaction.cpp:
2507         (WebCore::SQLTransaction::deliverStatementCallback):
2508         * Modules/webdatabase/SQLTransactionBackend.cpp:
2509         (WebCore::SQLTransactionBackend::currentStatement):
2510         (WebCore::SQLTransactionBackend::executeSQL):
2511         * Modules/webdatabase/SQLTransactionBackend.h:
2512         * WebCore.vcxproj/WebCore.vcxproj:
2513         * WebCore.vcxproj/WebCore.vcxproj.filters:
2514         * WebCore.xcodeproj/project.pbxproj:
2515
2516 2015-01-07  Timothy Horton  <timothy_horton@apple.com>
2517
2518         Manually-animated TextIndicator fades out blue selection if you click inside it
2519         https://bugs.webkit.org/show_bug.cgi?id=140224
2520         <rdar://problem/19317526>
2521
2522         Reviewed by Beth Dakin.
2523
2524         * page/mac/TextIndicatorWindow.mm:
2525         (-[WebTextIndicatorView hasCompletedAnimation]):
2526         (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
2527         Avoid fading out the TextIndicator if the animation hadn't completed.
2528         Also, use wantsManualAnimation instead of duplicating the switch here.
2529
2530 2015-01-07  Anders Carlsson  <andersca@apple.com>
2531
2532         Remove AbstractSQLStatementBackend
2533         https://bugs.webkit.org/show_bug.cgi?id=140222
2534
2535         Reviewed by Sam Weinig.
2536
2537         We're unlikely to fully take advantage of the SQL implementation being abstract anyway, so let's just simplify the code instead.
2538
2539         * Modules/webdatabase/AbstractSQLStatement.h:
2540         * Modules/webdatabase/AbstractSQLStatementBackend.h: Removed.
2541         * Modules/webdatabase/SQLStatement.cpp:
2542         (WebCore::SQLStatement::setBackend):
2543         * Modules/webdatabase/SQLStatement.h:
2544         * Modules/webdatabase/SQLStatementBackend.cpp:
2545         (WebCore::SQLStatementBackend::~SQLStatementBackend):
2546         * Modules/webdatabase/SQLStatementBackend.h:
2547         * WebCore.vcxproj/WebCore.vcxproj:
2548         * WebCore.vcxproj/WebCore.vcxproj.filters:
2549         * WebCore.xcodeproj/project.pbxproj:
2550
2551 2015-01-07  Brian J. Burg  <burg@cs.washington.edu>
2552
2553         Web Inspector: purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects
2554         https://bugs.webkit.org/show_bug.cgi?id=140053
2555
2556         Reviewed by Andreas Kling.
2557
2558         This patch replaces uses of PassRefPtr with uses of RefPtr&& and WTF::move() in code
2559         related to Web Inspector. It also converts many uses of RefPtr to Ref where
2560         references are always non-null. These two refactorings have been combined since
2561         they tend to require similar changes to the code.
2562
2563         No new tests, no behavior changed.
2564
2565         * Modules/webdatabase/DatabaseManager.cpp:
2566         (WebCore::DatabaseManager::openDatabase):
2567         * dom/Document.cpp:
2568         (WebCore::Document::logExceptionToConsole):
2569         (WebCore::Document::addMessage):
2570         * dom/Document.h:
2571         * dom/ScriptExecutionContext.cpp:
2572         (WebCore::ScriptExecutionContext::reportException):
2573         * dom/ScriptExecutionContext.h:
2574         * html/parser/XSSAuditorDelegate.cpp:
2575         (WebCore::XSSAuditorDelegate::generateViolationReport):
2576         * inspector/CommandLineAPIHost.cpp:
2577         (WebCore::CommandLineAPIHost::inspectImpl):
2578         * inspector/CommandLineAPIHost.h:
2579         * inspector/InspectorApplicationCacheAgent.cpp:
2580         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
2581         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
2582         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
2583         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
2584         * inspector/InspectorApplicationCacheAgent.h:
2585         * inspector/InspectorCSSAgent.cpp:
2586         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
2587         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
2588         (WebCore::InspectorCSSAgent::setStyleText):
2589         (WebCore::InspectorCSSAgent::setPropertyText):
2590         (WebCore::InspectorCSSAgent::toggleProperty):
2591         (WebCore::InspectorCSSAgent::setRuleSelector):
2592         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
2593         (WebCore::InspectorCSSAgent::forcePseudoState):
2594         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
2595         (WebCore::InspectorCSSAgent::detectOrigin):
2596         (WebCore::InspectorCSSAgent::buildObjectForRule):
2597         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2598         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2599         (WebCore::InspectorCSSAgent::buildArrayForRegions):
2600         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
2601         * inspector/InspectorCSSAgent.h:
2602         * inspector/InspectorConsoleInstrumentation.h:
2603         (WebCore::InspectorInstrumentation::addMessageToConsole):
2604         (WebCore::InspectorInstrumentation::consoleCount):
2605         (WebCore::InspectorInstrumentation::stopConsoleTiming):
2606         (WebCore::InspectorInstrumentation::consoleTimeStamp):
2607         (WebCore::InspectorInstrumentation::stopProfiling):
2608         * inspector/InspectorController.cpp:
2609         (WebCore::InspectorController::buildObjectForHighlightedNode):
2610         (WebCore::InspectorController::executionStopwatch):
2611         * inspector/InspectorController.h:
2612         * inspector/InspectorDOMAgent.cpp:
2613         (WebCore::parseColor):
2614         (WebCore::parseConfigColor):
2615         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
2616         (WebCore::InspectorDOMAgent::performSearch):
2617         (WebCore::InspectorDOMAgent::setInspectModeEnabled):
2618         (WebCore::InspectorDOMAgent::highlightRect):
2619         (WebCore::InspectorDOMAgent::highlightQuad):
2620         (WebCore::InspectorDOMAgent::innerHighlightQuad):
2621         (WebCore::InspectorDOMAgent::highlightNode):
2622         (WebCore::InspectorDOMAgent::highlightFrame):
2623         (WebCore::InspectorDOMAgent::buildObjectForNode):
2624         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
2625         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
2626         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2627         (WebCore::InspectorDOMAgent::processAccessibilityChildren):
2628         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2629         (WebCore::InspectorDOMAgent::didCommitLoad):
2630         (WebCore::InspectorDOMAgent::didInsertDOMNode):
2631         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
2632         (WebCore::InspectorDOMAgent::resolveNode):
2633         * inspector/InspectorDOMAgent.h:
2634         * inspector/InspectorDOMDebuggerAgent.cpp:
2635         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
2636         (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
2637         (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
2638         (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
2639         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
2640         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
2641         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
2642         * inspector/InspectorDOMDebuggerAgent.h:
2643         * inspector/InspectorDOMStorageAgent.cpp:
2644         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2645         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2646         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2647         (WebCore::InspectorDOMStorageAgent::storageId):
2648         (WebCore::InspectorDOMStorageAgent::findStorageArea):
2649         * inspector/InspectorDOMStorageAgent.h:
2650         * inspector/InspectorDatabaseAgent.cpp: Use Ref for all callbacks since they are
2651         not nullable.
2652         (WebCore::InspectorDatabaseAgent::executeSQL):
2653         * inspector/InspectorDatabaseAgent.h:
2654         * inspector/InspectorDatabaseInstrumentation.h:
2655         (WebCore::InspectorInstrumentation::didOpenDatabase):
2656         * inspector/InspectorDatabaseResource.cpp:
2657         (WebCore::InspectorDatabaseResource::create):
2658         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2659         (WebCore::InspectorDatabaseResource::bind):
2660         * inspector/InspectorDatabaseResource.h:
2661         (WebCore::InspectorDatabaseResource::setDatabase):
2662         * inspector/InspectorFrontendHost.h:
2663         (WebCore::InspectorFrontendHost::create):
2664         * inspector/InspectorIndexedDBAgent.cpp: Use Ref for all callbacks since they are
2665         not nullable.
2666         (WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
2667         (WebCore::InspectorIndexedDBAgent::requestDatabase):
2668         (WebCore::InspectorIndexedDBAgent::requestData):
2669         (WebCore::ClearObjectStoreListener::create):
2670         (WebCore::ClearObjectStoreListener::ClearObjectStoreListener):
2671         (WebCore::ClearObjectStore::create):
2672         (WebCore::ClearObjectStore::ClearObjectStore):
2673         (WebCore::InspectorIndexedDBAgent::clearObjectStore):
2674         * inspector/InspectorIndexedDBAgent.h:
2675         * inspector/InspectorInstrumentation.cpp:
2676         (WebCore::InspectorInstrumentation::willLoadXHRImpl):
2677         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
2678         (WebCore::InspectorInstrumentation::consoleCountImpl):
2679         (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
2680         (WebCore::InspectorInstrumentation::consoleTimeStampImpl):
2681         (WebCore::InspectorInstrumentation::stopProfilingImpl):
2682         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
2683         (WebCore::InspectorInstrumentation::sessionCreatedImpl):
2684         (WebCore::InspectorInstrumentation::sessionLoadedImpl):
2685         (WebCore::InspectorInstrumentation::sessionModifiedImpl):
2686         (WebCore::InspectorInstrumentation::segmentCreatedImpl):
2687         (WebCore::InspectorInstrumentation::segmentCompletedImpl):
2688         (WebCore::InspectorInstrumentation::segmentLoadedImpl):
2689         (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl): Deleted.
2690         (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl): Deleted.
2691         (WebCore::InspectorInstrumentation::startProfilingImpl): Deleted.
2692         (WebCore::InspectorInstrumentation::didDispatchDOMStorageEventImpl): Deleted.
2693         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript): Deleted.
2694         (WebCore::InspectorInstrumentation::captureStoppedImpl): Deleted.
2695         (WebCore::InspectorInstrumentation::playbackStartedImpl): Deleted.
2696         (WebCore::InspectorInstrumentation::playbackPausedImpl): Deleted.
2697         (WebCore::InspectorInstrumentation::playbackHitPositionImpl): Deleted.
2698         (WebCore::InspectorInstrumentation::playbackFinishedImpl): Deleted.
2699         (WebCore::InspectorInstrumentation::networkStateChangedImpl): Deleted.
2700         * inspector/InspectorInstrumentation.h:
2701         (WebCore::InspectorInstrumentation::willLoadXHR):
2702         (WebCore::InspectorInstrumentation::sessionCreated):
2703         (WebCore::InspectorInstrumentation::sessionLoaded):
2704         (WebCore::InspectorInstrumentation::sessionModified):
2705         (WebCore::InspectorInstrumentation::segmentCreated):
2706         (WebCore::InspectorInstrumentation::segmentCompleted):
2707         (WebCore::InspectorInstrumentation::segmentLoaded):
2708         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): Deleted.
2709         (WebCore::InspectorInstrumentation::didSendWebSocketFrame): Deleted.
2710         * inspector/InspectorLayerTreeAgent.cpp:
2711         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2712         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
2713         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
2714         * inspector/InspectorLayerTreeAgent.h:
2715         * inspector/InspectorOverlay.cpp:
2716         (WebCore::buildObjectForPoint):
2717         (WebCore::buildObjectForRect):
2718         (WebCore::buildArrayForQuad):
2719         (WebCore::buildObjectForHighlight):
2720         (WebCore::buildObjectForRegionHighlight):
2721         (WebCore::buildObjectForCSSRegionsHighlight):
2722         (WebCore::buildObjectForSize):
2723         (WebCore::buildObjectForCSSRegionContentClip):
2724         (WebCore::InspectorOverlay::drawPaintRects):
2725         (WebCore::buildObjectForRendererFragments):
2726         (WebCore::buildObjectForShapeOutside):
2727         (WebCore::buildObjectForElementInfo):
2728         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
2729         (WebCore::InspectorOverlay::reset):
2730         (WebCore::InspectorOverlay::evaluateInOverlay):
2731         * inspector/InspectorOverlay.h:
2732         * inspector/InspectorPageAgent.cpp:
2733         (WebCore::createXHRTextDecoder):
2734         (WebCore::buildObjectForCookie):
2735         (WebCore::buildArrayForCookies):
2736         (WebCore::buildObjectForSearchResult):
2737         (WebCore::InspectorPageAgent::buildObjectForFrame):
2738         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2739         * inspector/InspectorPageAgent.h:
2740         * inspector/InspectorReplayAgent.cpp:
2741         (WebCore::buildInspectorObjectForPosition):
2742         (WebCore::buildInspectorObjectForInput):
2743         (WebCore::buildInspectorObjectForSession):
2744         (WebCore::buildInspectorObjectForSegment):
2745         (WebCore::InspectorReplayAgent::replayToPosition):
2746         (WebCore::InspectorReplayAgent::getSessionData):
2747         (WebCore::InspectorReplayAgent::getSegmentData):
2748         * inspector/InspectorReplayAgent.h:
2749         * inspector/InspectorResourceAgent.cpp:
2750         (WebCore::buildObjectForHeaders):
2751         (WebCore::buildObjectForTiming):
2752         (WebCore::buildObjectForResourceRequest):
2753         (WebCore::buildObjectForResourceResponse):
2754         (WebCore::buildObjectForCachedResource):
2755         (WebCore::InspectorResourceAgent::willLoadXHR):
2756         (WebCore::InspectorResourceAgent::buildInitiatorObject):
2757         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
2758         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
2759         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
2760         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
2761         (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
2762         (WebCore::InspectorResourceAgent::loadResource):
2763         (WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): Deleted.
2764         (WebCore::InspectorResourceAgent::didScheduleStyleRecalculation): Deleted.
2765         (WebCore::InspectorResourceAgent::disable): Deleted.
2766         (WebCore::InspectorResourceAgent::setCacheDisabled): Deleted.
2767         * inspector/InspectorResourceAgent.h:
2768         * inspector/InspectorStyleSheet.cpp:
2769         (ParsedStyleSheet::ruleSourceDataAt):
2770         (WebCore::buildSourceRangeObject):
2771         (WebCore::buildMediaObject):
2772         (WebCore::asCSSRuleList):
2773         (WebCore::fillMediaListChain):
2774         (WebCore::InspectorStyle::create):
2775         (WebCore::InspectorStyle::InspectorStyle):
2776         (WebCore::InspectorStyle::buildObjectForStyle):
2777         (WebCore::InspectorStyle::buildArrayForComputedStyle):
2778         (WebCore::InspectorStyle::styleWithProperties):
2779         (WebCore::InspectorStyle::extractSourceData):
2780         (WebCore::InspectorStyleSheet::create):
2781         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
2782         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2783         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
2784         (WebCore::buildObjectForSelectorHelper):
2785         (WebCore::selectorsFromSource):
2786         (WebCore::InspectorStyleSheet::buildObjectForSelector):
2787         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
2788         (WebCore::InspectorStyleSheet::buildObjectForRule):
2789         (WebCore::InspectorStyleSheet::buildObjectForStyle):
2790         (WebCore::InspectorStyleSheet::toggleProperty):
2791         (WebCore::InspectorStyleSheet::inspectorStyleForId):
2792         (WebCore::InspectorStyleSheet::rememberInspectorStyle):
2793         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
2794         (WebCore::InspectorStyleSheet::collectFlatRules):
2795         (WebCore::InspectorStyleSheetForInlineStyle::create):
2796         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
2797         (WebCore::InspectorStyleSheetForInlineStyle::inspectorStyleForId):
2798         * inspector/InspectorStyleSheet.h:
2799         (WebCore::InspectorCSSId::InspectorCSSId):
2800         (WebCore::InspectorCSSId::asProtocolValue):
2801         * inspector/InspectorTimelineAgent.cpp:
2802         (WebCore::InspectorTimelineAgent::startFromConsole):
2803         (WebCore::InspectorTimelineAgent::stopFromConsole):
2804         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
2805         (WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
2806         (WebCore::InspectorTimelineAgent::appendRecord):
2807         (WebCore::InspectorTimelineAgent::sendEvent):
2808         (WebCore::InspectorTimelineAgent::createRecordEntry):
2809         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2810         * inspector/InspectorTimelineAgent.h:
2811         * inspector/InspectorWorkerAgent.cpp:
2812         (WebCore::InspectorWorkerAgent::sendMessageToWorker):
2813         * inspector/InspectorWorkerAgent.h:
2814         * inspector/NetworkResourcesData.cpp:
2815         (WebCore::XHRReplayData::create):
2816         (WebCore::XHRReplayData::XHRReplayData):
2817         * inspector/NetworkResourcesData.h:
2818         (WebCore::NetworkResourcesData::ResourceData::decoder):
2819         (WebCore::NetworkResourcesData::ResourceData::setDecoder):
2820         (WebCore::NetworkResourcesData::ResourceData::buffer):
2821         (WebCore::NetworkResourcesData::ResourceData::setBuffer):
2822         * inspector/TimelineRecordFactory.cpp:
2823         (WebCore::TimelineRecordFactory::createGenericRecord):
2824         (WebCore::TimelineRecordFactory::createBackgroundRecord):
2825         (WebCore::TimelineRecordFactory::createGCEventData):
2826         (WebCore::TimelineRecordFactory::createFunctionCallData):
2827         (WebCore::TimelineRecordFactory::createConsoleProfileData):
2828         (WebCore::TimelineRecordFactory::createProbeSampleData):
2829         (WebCore::TimelineRecordFactory::createEventDispatchData):
2830         (WebCore::TimelineRecordFactory::createGenericTimerData):
2831         (WebCore::TimelineRecordFactory::createTimerInstallData):
2832         (WebCore::TimelineRecordFactory::createXHRReadyStateChangeData):
2833         (WebCore::TimelineRecordFactory::createXHRLoadData):
2834         (WebCore::TimelineRecordFactory::createEvaluateScriptData):
2835         (WebCore::TimelineRecordFactory::createTimeStampData):
2836         (WebCore::TimelineRecordFactory::createScheduleResourceRequestData):
2837         (WebCore::TimelineRecordFactory::createResourceSendRequestData):
2838         (WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
2839         (WebCore::TimelineRecordFactory::createResourceFinishData):
2840         (WebCore::TimelineRecordFactory::createReceiveResourceData):
2841         (WebCore::TimelineRecordFactory::createLayoutData):
2842         (WebCore::TimelineRecordFactory::createDecodeImageData):
2843         (WebCore::TimelineRecordFactory::createResizeImageData):
2844         (WebCore::TimelineRecordFactory::createMarkData):
2845         (WebCore::TimelineRecordFactory::createParseHTMLData):
2846         (WebCore::TimelineRecordFactory::createAnimationFrameData):
2847         (WebCore::createQuad):
2848         (WebCore::TimelineRecordFactory::createPaintData):
2849         (WebCore::buildInspectorObject):
2850         (WebCore::buildProfileInspectorObject):
2851         (WebCore::TimelineRecordFactory::appendProfile):
2852         * inspector/TimelineRecordFactory.h:
2853         (WebCore::TimelineRecordFactory::createWebSocketCreateData):
2854         (WebCore::TimelineRecordFactory::createGenericWebSocketData):
2855         * inspector/WorkerInspectorController.cpp:
2856         (WebCore::WorkerInspectorController::executionStopwatch):
2857         * inspector/WorkerInspectorController.h:
2858         * page/PageConsoleClient.cpp:
2859         (WebCore::PageConsoleClient::addMessage):
2860         (WebCore::PageConsoleClient::messageWithTypeAndLevel):
2861         (WebCore::PageConsoleClient::count):
2862         (WebCore::PageConsoleClient::profileEnd):
2863         (WebCore::PageConsoleClient::timeEnd):
2864         (WebCore::PageConsoleClient::timeStamp):
2865         * page/PageConsoleClient.h:
2866         * replay/ReplayController.cpp:
2867         (WebCore::ReplayController::switchSession):
2868         (WebCore::ReplayController::createSegment):
2869         (WebCore::ReplayController::completeSegment):
2870         (WebCore::ReplayController::loadSegmentAtIndex):
2871         * replay/ReplayInputCreationMethods.cpp:
2872         (WebCore::InitialNavigation::createFromPage):
2873         * workers/SharedWorkerGlobalScope.cpp:
2874         (WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
2875         * workers/SharedWorkerGlobalScope.h:
2876         * workers/WorkerGlobalScope.cpp:
2877         (WebCore::WorkerGlobalScope::logExceptionToConsole):
2878         (WebCore::WorkerGlobalScope::addMessage):
2879         (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
2880         * workers/WorkerGlobalScope.h:
2881
2882 2015-01-07  Anders Carlsson  <andersca@apple.com>
2883
2884         Annotate properties that start with "new" so they'll work under ARC
2885         https://bugs.webkit.org/show_bug.cgi?id=140215
2886         rdar://problem/19399153
2887
2888         Reviewed by Geoffrey Garen.
2889
2890         When encountering attributes that start with "new", also generate an additional getter method declaration that
2891         has an NS_RETURNS_NOT_RETAINED annotation so ARC will know not to overrelease the property value.
2892
2893         * bindings/scripts/CodeGeneratorObjC.pm:
2894         (GenerateHeader):
2895
2896 2015-01-07  Beth Dakin  <bdakin@apple.com>
2897
2898         Adopt delegate callbacks so that standardQuickLookMenuItem does not obscure the 
2899         link
2900         https://bugs.webkit.org/show_bug.cgi?id=140206
2901         -and corresponding-
2902         rdar://problem/19300492
2903
2904         Reviewed by Tim Horton.
2905
2906         More delegate methods.
2907         * platform/spi/mac/QuickLookMacSPI.h:
2908
2909 2015-01-07  Bem Jones-Bey  <bjonesbe@adobe.com>
2910
2911         [CSS Shapes] Negative raster shape height leads to crash
2912         https://bugs.webkit.org/show_bug.cgi?id=136087
2913
2914         Reviewed by Zoltan Horvath.
2915
2916         This patch clamps the size of the margin box rect used to compute the
2917         raster shape on a float so the width and height cannot be negative.
2918         This makes it safe to use that rect to determine the size of the shape
2919         intervals data structure.
2920
2921         Test: fast/shapes/shape-outside-floats/shape-outside-negative-height-crash.html
2922
2923         * rendering/shapes/Shape.cpp:
2924         (WebCore::Shape::createRasterShape): Add an assert to be explict about
2925             the precondition.
2926         * rendering/shapes/ShapeOutsideInfo.cpp:
2927         (WebCore::getShapeImageMarginRect): Clamp the marginRect's size.
2928
2929 2015-01-06  Sam Weinig  <sam@webkit.org>
2930
2931         Modernize the SVGElement and MathMLElement factories
2932         https://bugs.webkit.org/show_bug.cgi?id=140163
2933
2934         Reviewed by Dan Bernstein.
2935
2936         * dom/Element.cpp:
2937         (WebCore::Element::create):
2938         * dom/Element.h:
2939         Change to return a Ref rather than a RefPtr.
2940
2941         * dom/make_names.pl:
2942         (printConstructorSignature):
2943         (printFactoryCppFile):
2944         (printFactoryHeaderFile):
2945         Change to unconditionally use Ref as the return type for element factories
2946         now that HTML is not special cased.
2947
2948         * SVG and MathML element files elided *
2949         Changed all SVG and MathML element's create functions to return a Ref.
2950
2951 2015-01-07  David Kilzer  <ddkilzer@apple.com>
2952
2953         REGRESSION (r178028): iOS build broken due to unused parameters in GlyphPage::mayUseMixedFontDataWhenFilling()
2954
2955         Fixes the following build errors:
2956
2957             WebCore/platform/graphics/mac/GlyphPageMac.cpp:58:61: error: unused parameter 'buffer' [-Werror,-Wunused-parameter]
2958             bool GlyphPage::mayUseMixedFontDataWhenFilling(const UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)
2959                                                                         ^
2960             WebCore/platform/graphics/mac/GlyphPageMac.cpp:58:78: error: unused parameter 'bufferLength' [-Werror,-Wunused-parameter]
2961             bool GlyphPage::mayUseMixedFontDataWhenFilling(const UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)
2962                                                                                          ^
2963             WebCore/platform/graphics/mac/GlyphPageMac.cpp:58:114: error: unused parameter 'fontData' [-Werror,-Wunused-parameter]
2964             bool GlyphPage::mayUseMixedFontDataWhenFilling(const UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData)
2965                                                                                                                              ^
2966             3 errors generated.
2967
2968         * platform/graphics/mac/GlyphPageMac.cpp:
2969         (WebCore::GlyphPage::mayUseMixedFontDataWhenFilling): Add
2970         UNUSED_PARAM() as needed.
2971
2972 2015-01-07  Bem Jones-Bey  <bjonesbe@adobe.com>
2973
2974         [CSS Shapes] Content does not wrap with overflow: hidden and reference box different from margin-box
2975         https://bugs.webkit.org/show_bug.cgi?id=138139
2976
2977         Reviewed by David Hyatt.
2978
2979         To determine how much an box needs to shink to avoid a float, the code
2980         was only taking into account the first line of the box. This doesn't
2981         work when the float has a shape, as it can make it seem like there is
2982         more space on the line than there actually is. This patch changes the
2983         calculations to take into account the entire height of the box that
2984         needs to be shrunk, and thus computes the correct amount of space
2985         available.
2986
2987         Test: fast/shapes/shape-outside-floats/shape-overflow-hidden-left-margin.html
2988               fast/shapes/shape-outside-floats/shape-overflow-hidden-right-margin.html
2989               fast/shapes/shape-outside-floats/shape-overflow-hidden.html
2990
2991         * rendering/RenderBox.cpp:
2992         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2993
2994 2015-01-07  Commit Queue  <commit-queue@webkit.org>
2995
2996         Unreviewed, rolling out r178039.
2997         https://bugs.webkit.org/show_bug.cgi?id=140187
2998
2999         Breaks ObjC Inspector Protocol (Requested by JoePeck on
3000         #webkit).
3001
3002         Reverted changeset:
3003
3004         "Web Inspector: purge PassRefPtr from Inspector code and use
3005         Ref for typed and untyped protocol objects"
3006         https://bugs.webkit.org/show_bug.cgi?id=140053
3007         http://trac.webkit.org/changeset/178039
3008
3009 2015-01-06  Brian J. Burg  <burg@cs.washington.edu>
3010
3011         Web Inspector: purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects
3012         https://bugs.webkit.org/show_bug.cgi?id=140053
3013
3014         Reviewed by Andreas Kling.
3015
3016         This patch replaces uses of PassRefPtr with uses of RefPtr&& and WTF::move() in code
3017         related to Web Inspector. It also converts many uses of RefPtr to Ref where
3018         references are always non-null. These two refactorings have been combined since
3019         they tend to require similar changes to the code.
3020
3021         No new tests, no behavior changed.
3022
3023         * Modules/webdatabase/DatabaseManager.cpp:
3024         (WebCore::DatabaseManager::openDatabase):
3025         * dom/Document.cpp:
3026         (WebCore::Document::logExceptionToConsole):
3027         (WebCore::Document::addMessage):
3028         * dom/Document.h:
3029         * dom/ScriptExecutionContext.cpp:
3030         (WebCore::ScriptExecutionContext::reportException):
3031         * dom/ScriptExecutionContext.h:
3032         * html/parser/XSSAuditorDelegate.cpp:
3033         (WebCore::XSSAuditorDelegate::generateViolationReport):
3034         * inspector/CommandLineAPIHost.cpp:
3035         (WebCore::CommandLineAPIHost::inspectImpl):
3036         * inspector/CommandLineAPIHost.h:
3037         * inspector/InspectorApplicationCacheAgent.cpp:
3038         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
3039         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
3040         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
3041         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
3042         * inspector/InspectorApplicationCacheAgent.h:
3043         * inspector/InspectorCSSAgent.cpp:
3044         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
3045         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
3046         (WebCore::InspectorCSSAgent::setStyleText):
3047         (WebCore::InspectorCSSAgent::setPropertyText):
3048         (WebCore::InspectorCSSAgent::toggleProperty):
3049         (WebCore::InspectorCSSAgent::setRuleSelector):
3050         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
3051         (WebCore::InspectorCSSAgent::forcePseudoState):
3052         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
3053         (WebCore::InspectorCSSAgent::detectOrigin):
3054         (WebCore::InspectorCSSAgent::buildObjectForRule):
3055         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3056         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
3057         (WebCore::InspectorCSSAgent::buildArrayForRegions):
3058         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
3059         * inspector/InspectorCSSAgent.h:
3060         * inspector/InspectorConsoleInstrumentation.h:
3061         (WebCore::InspectorInstrumentation::addMessageToConsole):
3062         (WebCore::InspectorInstrumentation::consoleCount):
3063         (WebCore::InspectorInstrumentation::stopConsoleTiming):
3064         (WebCore::InspectorInstrumentation::consoleTimeStamp):
3065         (WebCore::InspectorInstrumentation::stopProfiling):
3066         * inspector/InspectorController.cpp:
3067         (WebCore::InspectorController::buildObjectForHighlightedNode):
3068         (WebCore::InspectorController::executionStopwatch):
3069         * inspector/InspectorController.h:
3070         * inspector/InspectorDOMAgent.cpp:
3071         (WebCore::parseColor):
3072         (WebCore::parseConfigColor):
3073         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
3074         (WebCore::InspectorDOMAgent::performSearch):
3075         (WebCore::InspectorDOMAgent::setInspectModeEnabled):
3076         (WebCore::InspectorDOMAgent::highlightRect):
3077         (WebCore::InspectorDOMAgent::highlightQuad):
3078         (WebCore::InspectorDOMAgent::innerHighlightQuad):
3079         (WebCore::InspectorDOMAgent::highlightNode):
3080         (WebCore::InspectorDOMAgent::highlightFrame):
3081         (WebCore::InspectorDOMAgent::buildObjectForNode):
3082         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
3083         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
3084         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
3085         (WebCore::InspectorDOMAgent::processAccessibilityChildren):
3086         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3087         (WebCore::InspectorDOMAgent::didCommitLoad):
3088         (WebCore::InspectorDOMAgent::didInsertDOMNode):
3089         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
3090         (WebCore::InspectorDOMAgent::resolveNode):
3091         * inspector/InspectorDOMAgent.h:
3092         * inspector/InspectorDOMDebuggerAgent.cpp:
3093         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
3094         (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
3095         (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
3096         (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
3097         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
3098         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
3099         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
3100         * inspector/InspectorDOMDebuggerAgent.h:
3101         * inspector/InspectorDOMStorageAgent.cpp:
3102         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
3103         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
3104         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
3105         (WebCore::InspectorDOMStorageAgent::storageId):
3106         (WebCore::InspectorDOMStorageAgent::findStorageArea):
3107         * inspector/InspectorDOMStorageAgent.h:
3108         * inspector/InspectorDatabaseAgent.cpp: Use Ref for all callbacks since they are
3109         not nullable.
3110         (WebCore::InspectorDatabaseAgent::executeSQL):
3111         * inspector/InspectorDatabaseAgent.h:
3112         * inspector/InspectorDatabaseInstrumentation.h:
3113         (WebCore::InspectorInstrumentation::didOpenDatabase):
3114         * inspector/InspectorDatabaseResource.cpp:
3115         (WebCore::InspectorDatabaseResource::create):
3116         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
3117         (WebCore::InspectorDatabaseResource::bind):
3118         * inspector/InspectorDatabaseResource.h:
3119         (WebCore::InspectorDatabaseResource::setDatabase):
3120         * inspector/InspectorFrontendHost.h:
3121         (WebCore::InspectorFrontendHost::create):
3122         * inspector/InspectorIndexedDBAgent.cpp: Use Ref for all callbacks since they are
3123         not nullable.
3124         (WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
3125         (WebCore::InspectorIndexedDBAgent::requestDatabase):
3126         (WebCore::InspectorIndexedDBAgent::requestData):
3127         (WebCore::ClearObjectStoreListener::create):
3128         (WebCore::ClearObjectStoreListener::ClearObjectStoreListener):
3129         (WebCore::ClearObjectStore::create):
3130         (WebCore::ClearObjectStore::ClearObjectStore):
3131         (WebCore::InspectorIndexedDBAgent::clearObjectStore):
3132         * inspector/InspectorIndexedDBAgent.h:
3133         * inspector/InspectorInstrumentation.cpp:
3134         (WebCore::InspectorInstrumentation::willLoadXHRImpl):
3135         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
3136         (WebCore::InspectorInstrumentation::consoleCountImpl):
3137         (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
3138         (WebCore::InspectorInstrumentation::consoleTimeStampImpl):
3139         (WebCore::InspectorInstrumentation::stopProfilingImpl):
3140         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
3141         (WebCore::InspectorInstrumentation::sessionCreatedImpl):
3142         (WebCore::InspectorInstrumentation::sessionLoadedImpl):
3143         (WebCore::InspectorInstrumentation::sessionModifiedImpl):
3144         (WebCore::InspectorInstrumentation::segmentCreatedImpl):
3145         (WebCore::InspectorInstrumentation::segmentCompletedImpl):
3146         (WebCore::InspectorInstrumentation::segmentLoadedImpl):
3147         (WebCore::InspectorInstrumentation::willLoadXHRSynchronouslyImpl): Deleted.
3148         (WebCore::InspectorInstrumentation::didLoadXHRSynchronouslyImpl): Deleted.
3149         (WebCore::InspectorInstrumentation::startProfilingImpl): Deleted.
3150         (WebCore::InspectorInstrumentation::didDispatchDOMStorageEventImpl): Deleted.
3151         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript): Deleted.
3152         (WebCore::InspectorInstrumentation::captureStoppedImpl): Deleted.
3153         (WebCore::InspectorInstrumentation::playbackStartedImpl): Deleted.
3154         (WebCore::InspectorInstrumentation::playbackPausedImpl): Deleted.
3155         (WebCore::InspectorInstrumentation::playbackHitPositionImpl): Deleted.
3156         (WebCore::InspectorInstrumentation::playbackFinishedImpl): Deleted.
3157         (WebCore::InspectorInstrumentation::networkStateChangedImpl): Deleted.
3158         * inspector/InspectorInstrumentation.h:
3159         (WebCore::InspectorInstrumentation::willLoadXHR):
3160         (WebCore::InspectorInstrumentation::sessionCreated):
3161         (WebCore::InspectorInstrumentation::sessionLoaded):
3162         (WebCore::InspectorInstrumentation::sessionModified):
3163         (WebCore::InspectorInstrumentation::segmentCreated):
3164         (WebCore::InspectorInstrumentation::segmentCompleted):
3165         (WebCore::InspectorInstrumentation::segmentLoaded):
3166         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient): Deleted.
3167         (WebCore::InspectorInstrumentation::didSendWebSocketFrame): Deleted.
3168         * inspector/InspectorLayerTreeAgent.cpp:
3169         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
3170         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
3171         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
3172         * inspector/InspectorLayerTreeAgent.h:
3173         * inspector/InspectorOverlay.cpp:
3174         (WebCore::buildObjectForPoint):
3175         (WebCore::buildObjectForRect):
3176         (WebCore::buildArrayForQuad):
3177         (WebCore::buildObjectForHighlight):
3178         (WebCore::buildObjectForRegionHighlight):
3179         (WebCore::buildObjectForCSSRegionsHighlight):
3180         (WebCore::buildObjectForSize):
3181         (WebCore::buildObjectForCSSRegionContentClip):
3182         (WebCore::InspectorOverlay::drawPaintRects):
3183         (WebCore::buildObjectForRendererFragments):
3184         (WebCore::buildObjectForShapeOutside):
3185         (WebCore::buildObjectForElementInfo):
3186         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
3187         (WebCore::InspectorOverlay::reset):
3188         (WebCore::InspectorOverlay::evaluateInOverlay):
3189         * inspector/InspectorOverlay.h:
3190         * inspector/InspectorPageAgent.cpp:
3191         (WebCore::createXHRTextDecoder):
3192         (WebCore::buildObjectForCookie):
3193         (WebCore::buildArrayForCookies):
3194         (WebCore::buildObjectForSearchResult):
3195         (WebCore::InspectorPageAgent::buildObjectForFrame):
3196         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
3197         * inspector/InspectorPageAgent.h:
3198         * inspector/InspectorReplayAgent.cpp:
3199         (WebCore::buildInspectorObjectForPosition):
3200         (WebCore::buildInspectorObjectForInput):
3201         (WebCore::buildInspectorObjectForSession):
3202         (WebCore::buildInspectorObjectForSegment):
3203         (WebCore::InspectorReplayAgent::replayToPosition):
3204         (WebCore::InspectorReplayAgent::getSessionData):
3205         (WebCore::InspectorReplayAgent::getSegmentData):
3206         * inspector/InspectorReplayAgent.h:
3207         * inspector/InspectorResourceAgent.cpp:
3208         (WebCore::buildObjectForHeaders):
3209         (WebCore::buildObjectForTiming):
3210         (WebCore::buildObjectForResourceRequest):
3211         (WebCore::buildObjectForResourceResponse):
3212         (WebCore::buildObjectForCachedResource):
3213         (WebCore::InspectorResourceAgent::willLoadXHR):
3214         (WebCore::InspectorResourceAgent::buildInitiatorObject):
3215         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
3216         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
3217         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
3218         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
3219         (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
3220         (WebCore::InspectorResourceAgent::loadResource):
3221         (WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient): Deleted.
3222         (WebCore::InspectorResourceAgent::didScheduleStyleRecalculation): Deleted.
3223         (WebCore::InspectorResourceAgent::disable): Deleted.
3224         (WebCore::InspectorResourceAgent::setCacheDisabled): Deleted.
3225         * inspector/InspectorResourceAgent.h:
3226         * inspector/InspectorStyleSheet.cpp:
3227         (ParsedStyleSheet::ruleSourceDataAt):
3228         (WebCore::buildSourceRangeObject):
3229         (WebCore::buildMediaObject):
3230         (WebCore::asCSSRuleList):
3231         (WebCore::fillMediaListChain):
3232         (WebCore::InspectorStyle::create):
3233         (WebCore::InspectorStyle::InspectorStyle):
3234         (WebCore::InspectorStyle::buildObjectForStyle):
3235         (WebCore::InspectorStyle::buildArrayForComputedStyle):
3236         (WebCore::InspectorStyle::styleWithProperties):
3237         (WebCore::InspectorStyle::extractSourceData):
3238         (WebCore::InspectorStyleSheet::create):
3239         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
3240         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
3241         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
3242         (WebCore::buildObjectForSelectorHelper):
3243         (WebCore::selectorsFromSource):
3244         (WebCore::InspectorStyleSheet::buildObjectForSelector):
3245         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
3246         (WebCore::InspectorStyleSheet::buildObjectForRule):
3247         (WebCore::InspectorStyleSheet::buildObjectForStyle):
3248         (WebCore::InspectorStyleSheet::toggleProperty):
3249         (WebCore::InspectorStyleSheet::inspectorStyleForId):
3250         (WebCore::InspectorStyleSheet::rememberInspectorStyle):
3251         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
3252         (WebCore::InspectorStyleSheet::collectFlatRules):
3253         (WebCore::InspectorStyleSheetForInlineStyle::create):
3254         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
3255         (WebCore::InspectorStyleSheetForInlineStyle::inspectorStyleForId):
3256         * inspector/InspectorStyleSheet.h:
3257         (WebCore::InspectorCSSId::InspectorCSSId):
3258         (WebCore::InspectorCSSId::asProtocolValue):
3259         * inspector/InspectorTimelineAgent.cpp:
3260         (WebCore::InspectorTimelineAgent::startFromConsole):
3261         (WebCore::InspectorTimelineAgent::stopFromConsole):
3262         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
3263         (WebCore::InspectorTimelineAgent::didCompleteRecordEntry):
3264         (WebCore::InspectorTimelineAgent::appendRecord):
3265         (WebCore::InspectorTimelineAgent::sendEvent):
3266         (WebCore::InspectorTimelineAgent::createRecordEntry):
3267         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
3268         * inspector/InspectorTimelineAgent.h:
3269         * inspector/InspectorWorkerAgent.cpp:
3270         (WebCore::InspectorWorkerAgent::sendMessageToWorker):
3271         * inspector/InspectorWorkerAgent.h:
3272         * inspector/NetworkResourcesData.cpp:
3273         (WebCore::XHRReplayData::create):
3274         (WebCore::XHRReplayData::XHRReplayData):
3275         * inspector/NetworkResourcesData.h:
3276         (WebCore::NetworkResourcesData::ResourceData::decoder):
3277         (WebCore::NetworkResourcesData::ResourceData::setDecoder):
3278         (WebCore::NetworkResourcesData::ResourceData::buffer):
3279         (WebCore::NetworkResourcesData::ResourceData::setBuffer):
3280         * inspector/TimelineRecordFactory.cpp:
3281         (WebCore::TimelineRecordFactory::createGenericRecord):
3282         (WebCore::TimelineRecordFactory::createBackgroundRecord):
3283         (WebCore::TimelineRecordFactory::createGCEventData):
3284         (WebCore::TimelineRecordFactory::createFunctionCallData):
3285         (WebCore::TimelineRecordFactory::createConsoleProfileData):
3286         (WebCore::TimelineRecordFactory::createProbeSampleData):
3287         (WebCore::TimelineRecordFactory::createEventDispatchData):
3288         (WebCore::TimelineRecordFactory::createGenericTimerData):
3289         (WebCore::TimelineRecordFactory::createTimerInstallData):
3290         (WebCore::TimelineRecordFactory::createXHRReadyStateChangeData):
3291         (WebCore::TimelineRecordFactory::createXHRLoadData):
3292         (WebCore::TimelineRecordFactory::createEvaluateScriptData):
3293         (WebCore::TimelineRecordFactory::createTimeStampData):
3294         (WebCore::TimelineRecordFactory::createScheduleResourceRequestData):
3295         (WebCore::TimelineRecordFactory::createResourceSendRequestData):
3296         (WebCore::TimelineRecordFactory::createResourceReceiveResponseData):
3297         (WebCore::TimelineRecordFactory::createResourceFinishData):
3298         (WebCore::TimelineRecordFactory::createReceiveResourceData):
3299         (WebCore::TimelineRecordFactory::createLayoutData):
3300         (WebCore::TimelineRecordFactory::createDecodeImageData):
3301         (WebCore::TimelineRecordFactory::createResizeImageData):
3302         (WebCore::TimelineRecordFactory::createMarkData):
3303         (WebCore::TimelineRecordFactory::createParseHTMLData):
3304         (WebCore::TimelineRecordFactory::createAnimationFrameData):
3305         (WebCore::createQuad):
3306         (WebCore::TimelineRecordFactory::createPaintData):
3307         (WebCore::buildInspectorObject):
3308         (WebCore::buildProfileInspectorObject):
3309         (WebCore::TimelineRecordFactory::appendProfile):
3310         * inspector/TimelineRecordFactory.h:
3311         (WebCore::TimelineRecordFactory::createWebSocketCreateData):
3312         (WebCore::TimelineRecordFactory::createGenericWebSocketData):
3313         * inspector/WorkerInspectorController.cpp:
3314         (WebCore::WorkerInspectorController::executionStopwatch):
3315         * inspector/WorkerInspectorController.h:
3316         * page/PageConsoleClient.cpp:
3317         (WebCore::PageConsoleClient::addMessage):
3318         (WebCore::PageConsoleClient::messageWithTypeAndLevel):
3319         (WebCore::PageConsoleClient::count):
3320         (WebCore::PageConsoleClient::profileEnd):
3321         (WebCore::PageConsoleClient::timeEnd):
3322         (WebCore::PageConsoleClient::timeStamp):
3323         * page/PageConsoleClient.h:
3324         * replay/ReplayController.cpp:
3325         (WebCore::ReplayController::switchSession):
3326         (WebCore::ReplayController::createSegment):
3327         (WebCore::ReplayController::completeSegment):
3328         (WebCore::ReplayController::loadSegmentAtIndex):
3329         * replay/ReplayInputCreationMethods.cpp:
3330         (WebCore::InitialNavigation::createFromPage):
3331         * workers/SharedWorkerGlobalScope.cpp:
3332         (WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
3333         * workers/SharedWorkerGlobalScope.h:
3334         * workers/WorkerGlobalScope.cpp:
3335         (WebCore::WorkerGlobalScope::logExceptionToConsole):
3336         (WebCore::WorkerGlobalScope::addMessage):
3337         (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
3338         * workers/WorkerGlobalScope.h:
3339
3340 2015-01-07  Chris Fleizach  <cfleizach@apple.com>
3341
3342         AX: Crash: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse + 149
3343         https://bugs.webkit.org/show_bug.cgi?id=139929
3344
3345         Reviewed by Darin Adler.
3346
3347         When a frame is replaced, there were instances when it was not clearing its associated nodes in the accessibility text marker -> Node cache.
3348         This caused dead Nodes to be left in the cache which would eventually be accessed when the cache was cleaned out at a later time.
3349
3350         To fix this we should be clearing out the cache in Document::prepareForDestruction, instead of Frame::disconnectOwnerElement.
3351
3352         While working on this, it also exposed a problem where when a frame goes away, it doesn't inform its parent to update its children,
3353         which causes an ASSERT to be hit with this test as well.
3354
3355         Tests: accessibility/frame-disconnect-textmarker-cache-crash.html
3356
3357         * dom/Document.cpp:
3358         (WebCore::Document::prepareForDestruction):
3359         * page/Frame.cpp:
3360         (WebCore::Frame::disconnectOwnerElement):
3361             Remove cache management from here since it is superceded by code in Document::prepareForDestruction
3362         * page/FrameView.cpp:
3363         (WebCore::FrameView::removeFromAXObjectCache):
3364
3365 2015-01-07  Zan Dobersek  <zdobersek@igalia.com>
3366
3367         Unreviewed fix for the CoordinatedGraphics builds after r178034.
3368
3369         * platform/graphics/texmap/TextureMapperLayer.cpp:
3370         (WebCore::TextureMapperLayer::setChildren): Add back the setChildren()
3371         variant that receives a reference to the Vector of TextureMapperLayer
3372         objects. This is still used by the CoordinatedGraphics code that still
3373         constructs a separate Vector object each time the layer's children change.
3374         * platform/graphics/texmap/TextureMapperLayer.h:
3375
3376 2015-01-07  Zan Dobersek  <zdobersek@igalia.com>
3377
3378         [TexMap] Use std::sort instead of qsort in TextureMapperLayer::sortByZOrder()
3379         https://bugs.webkit.org/show_bug.cgi?id=136212
3380
3381         Reviewed by Darin Adler.
3382
3383         Use std::sort() instead of qsort() to sort the TextureMapperLayer objects
3384         by their z-order. A lambda expression can be used to compare the m_centerZ 
3385         member variables of any two TextureMapperLayers.
3386