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