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