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