[MathML] The double bar vertical delimiter does not stretch properly
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-09  Martin Robinson  <mrobinson@igalia.com>
2
3         [MathML] The double bar vertical delimiter does not stretch properly
4         https://bugs.webkit.org/show_bug.cgi?id=123543
5
6         Reviewed by Chris Fleizach.
7
8         * rendering/mathml/RenderMathMLOperator.cpp: Add stretching support for U+2225, which
9         is another version of the vertical bar.
10
11 2013-11-13  Simon Fraser  <simon.fraser@apple.com>
12
13         ASSERTION FAILED: m_repaintRect == renderer().clippedOverflowRectForRepaint(renderer().containerForRepaint()) after r135816
14         https://bugs.webkit.org/show_bug.cgi?id=103432
15
16         Reviewed by Dave Hyatt.
17
18         RenderLayer caches repaint rects in m_repaintRect, and on updating layer
19         positions after scrolling, asserts that the cached rect is correct. However,
20         this assertion would sometimes fail if we were scrolling as a result of
21         doing adjustViewSize() in the middle of layout, because we haven't updated
22         layer positions post-layout yet.
23         
24         Fix by having the poorly named FrameView::repaintFixedElementsAfterScrolling()
25         skip the layer updating if this FrameView is inside of adjusetViewSize() in
26         layout.
27         
28         In order to know if we're inside view size adjusting, add a LayoutPhase
29         member to FrameView, replacing two existing bools that track laying out state.
30
31         Investigative work showed that there are many, many ways to re-enter FrameView::layout(),
32         which makes it hard (but desirable) to more assertions about state changes, but
33         indicated that saving and restoring the state (via TemporaryChange<LayoutPhase>)
34         was a good idea.
35
36         * page/FrameView.cpp:
37         (WebCore::FrameView::FrameView):
38         (WebCore::FrameView::reset):
39         (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
40         (WebCore::FrameView::layout):
41         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
42         * page/FrameView.h:
43
44 2013-11-13  Myles C. Maxfield  <mmaxfield@apple.com>
45
46         Delete unused TextPainter function
47         https://bugs.webkit.org/show_bug.cgi?id=124292
48
49         Reviewed by Tim Horton.
50
51         New tests are unnecessary since there is no behavior change
52
53         * rendering/TextPainter.cpp:
54         (WebCore::TextPainter::paintText):
55         * rendering/TextPainter.h:
56
57 2013-11-13  Alexey Proskuryakov  <ap@apple.com>
58
59         Check WebCrypto parameter types when casting
60         https://bugs.webkit.org/show_bug.cgi?id=124297
61
62         Reviewed by Sam Weinig.
63
64         Also changed existing toCryptoXXX functions to use TYPE_CASTS_BASE mechanism.
65
66         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
67         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
68         And sure enough, there was a bug caught by the added checks.
69
70         * bindings/js/JSCryptoKeySerializationJWK.cpp:
71         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
72         * crypto/CryptoAlgorithmParameters.h:
73         (WebCore::CryptoAlgorithmParameters::ENUM_CLASS):
74         (WebCore::CryptoAlgorithmParameters::parametersClass):
75         * crypto/CryptoKey.h:
76         * crypto/CryptoKeyData.h:
77         * crypto/CryptoKeySerialization.h:
78         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
79         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
80         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
81         (WebCore::CryptoAlgorithmHMAC::generateKey):
82         (WebCore::CryptoAlgorithmHMAC::importKey):
83         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
84         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
85         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
86         * crypto/keys/CryptoKeyAES.h:
87         * crypto/keys/CryptoKeyDataOctetSequence.h:
88         (WebCore::isCryptoKeyDataOctetSequence):
89         * crypto/keys/CryptoKeyDataRSAComponents.h:
90         (WebCore::isCryptoKeyDataRSAComponents):
91         * crypto/keys/CryptoKeyHMAC.h:
92         * crypto/keys/CryptoKeyRSA.h:
93         * crypto/keys/CryptoKeySerializationRaw.h:
94         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
95         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
96         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
97         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
98         (WebCore::CryptoAlgorithmHMAC::sign):
99         (WebCore::CryptoAlgorithmHMAC::verify):
100         * crypto/parameters/CryptoAlgorithmAesCbcParams.h:
101         * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h:
102         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
103         * crypto/parameters/CryptoAlgorithmHmacParams.h:
104         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
105         * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h:
106         * crypto/parameters/CryptoAlgorithmRsaSsaParams.h:
107
108 2013-11-13  Alexey Proskuryakov  <ap@apple.com>
109
110         crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html is failing on Maverics release bot
111         https://bugs.webkit.org/show_bug.cgi?id=124280
112
113         Reviewed by Anders Carlsson.
114
115         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::buildAlgorithmDescription):
116         Don't be a muppet, initialize your variables.
117
118 2013-11-12  Jer Noble  <jer.noble@apple.com>
119
120         Add support for HTMLMediaElement.fastSeek()
121         https://bugs.webkit.org/show_bug.cgi?id=124262
122
123         Reviewed by Eric Carlson.
124
125         Test: media/video-fast-seek.html
126
127         Add the fastSeek() method to HTMLMediaElement, and use fastSeek() in
128         the JavaScript media controls.
129
130         Add the new fastSeek() method:
131         * html/HTMLMediaElement.cpp:
132         (HTMLMediaElement::fastSeek): Call seekWithTolerance.
133         (HTMLMediaElement::seek): Call seekWithTolerance with 0 tolerance.
134         (HTMLMediaElement::seekWithTolerance): Renamed from seek().
135         * html/HTMLMediaElement.h:
136         * html/HTMLMediaElement.idl:
137
138         Add seekWithTolerance() to MediaPlayer:
139         * platform/graphics/MediaPlayer.cpp:
140         (WebCore::MediaPlayer::seekWithTolerance): Pass to MediaPlayerPrivate.
141         * platform/graphics/MediaPlayer.h:
142         * platform/graphics/MediaPlayerPrivate.h:
143         (WebCore::MediaPlayerPrivateInterface::seekWithTolerance): Default implementation which
144             calls seek().
145         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
146         (WebCore::MediaPlayerPrivateAVFoundation::seek): Call seekWithTolerance with 0 tolerance.
147         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Renamed from seek().
148         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
149         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
150         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
151         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Take tolerance parameters.
152
153         Use the new fastSeek() method while actively scrubbing.
154         * Modules/mediacontrols/mediaControlsApple.js:
155         (Controller.prototype.createControls): Add mouse up and down handlers.
156         (Controller.prototype.handleTimeUpdate): Only update the timeline when not scrubbing.
157         (Controller.prototype.handleTimelineChange): Use fastSeek().
158         (Controller.prototype.handleTimelineMouseDown): Start scrubbing.
159         (Controller.prototype.handleTimelineMouseUp): Stop scrubbing.
160
161 2013-11-13  Andreas Kling  <akling@apple.com>
162
163         Generate casting helpers for scrolling tree classes.
164         <https://webkit.org/b/124286>
165
166         Added SCROLLING_STATE_NODE_TYPE_CASTS and used it to replace the
167         hand-written toFoo() casts for ScrollingStateNode subclasses.
168
169         Reviewed by Anders Carlsson.
170
171 2013-11-13  Hans Muller  <hmuller@adobe.com>
172
173         [CSS Shapes] Determining if a line is inside of a shape should only happen in one place
174         https://bugs.webkit.org/show_bug.cgi?id=121708
175
176         Reviewed by Andreas Kling.
177
178         The ShapeInfo::lineOverlapsShapeBounds() methods now delegate to the Shape object. The
179         logic for the Shape overlap test is now the same for ShapeInsideInfo and ShapeOutsideInfo.
180
181         No new tests, this is just a refactoring of existing code.
182
183         * rendering/shapes/Shape.h:
184         (WebCore::Shape::lineOverlapsShapeMarginBounds): Apply lineOverlapsLayoutRect() to the shape-margin bounds LayoutRect.
185         (WebCore::Shape::lineOverlapsShapePaddingBounds): Apply lineOverlapsLayoutRect() to the shape-padding bounds LayoutRect.
186         (WebCore::Shape::lineOverlapsLayoutRect): The common code for checking if a line and a LayoutRect overlap.
187         * rendering/shapes/ShapeInsideInfo.h: Use lineOverlapsShapePaddingBounds() for lineOverlapShapeBounds().
188         * rendering/shapes/ShapeOutsideInfo.h: Use lineOverlapsShapeMarginBounds() for lineOverlapShapeBounds().
189
190 2013-11-13  Jochen Eisinger  <jochen@chromium.org>
191
192         Restrict UserGestureIndicator to main thread
193         https://bugs.webkit.org/show_bug.cgi?id=124277
194
195         Reviewed by Andreas Kling.
196
197         Certain classes that interact with UserGestureIndicators, e.g.
198         the DOMTimer, can also live on worker threads. Since a
199         background thread cannot possible get a user gesture in the
200         first place, and to avoid races, we turn a UserGestureIndicator
201         on a background thread into a no-op.
202
203         * dom/UserGestureIndicator.cpp:
204         (WebCore::UserGestureIndicator::UserGestureIndicator):
205         (WebCore::UserGestureIndicator::~UserGestureIndicator):
206         (WebCore::UserGestureIndicator::processingUserGesture):
207         * dom/UserGestureIndicator.h:
208
209 2013-11-13  Antti Koivisto  <antti@apple.com>
210
211         Factor simple line creation loop to function
212         https://bugs.webkit.org/show_bug.cgi?id=124279
213
214         Reviewed by Andreas Kling.
215
216         * rendering/SimpleLineLayout.cpp:
217         (WebCore::SimpleLineLayout::Style::Style):
218         
219             Capture style that affects line layout to a struct.
220
221         (WebCore::SimpleLineLayout::textWidth):
222         (WebCore::SimpleLineLayout::measureWord):
223         (WebCore::SimpleLineLayout::createLineRuns):
224         
225             Factor the line loop here.
226
227         (WebCore::SimpleLineLayout::createTextRuns):
228
229 2013-11-12  Antti Koivisto  <antti@apple.com>
230
231         Support overflow-wrap:break-word on simple line path
232         https://bugs.webkit.org/show_bug.cgi?id=124206
233
234         Reviewed by Andreas Kling.
235
236         Pure text documents are rendered with break-word. It is also common in discussion board type sites.
237         
238         This also makes many <textarea>'s rendered using the simple line path.
239
240         Tests: fast/forms/basic-textareas-quirks-simple-lines.html
241                fast/forms/linebox-overflow-in-textarea-padding-simple-lines.html
242                fast/forms/negativeLineHeight-simple-lines.html
243                fast/forms/textAreaLineHeight-simple-lines.html
244
245         * rendering/RenderBlock.cpp:
246         (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange):
247         (WebCore::RenderBlock::markShapeInsideDescendantsForLayout):
248         
249             Invalidate the cached line layout mode on shape-inside style change.
250
251         * rendering/SimpleLineLayout.cpp:
252         (WebCore::SimpleLineLayout::canUseForText):
253         (WebCore::SimpleLineLayout::canUseFor):
254         (WebCore::SimpleLineLayout::createTextRuns):
255
256 2013-11-13  Andreas Kling  <akling@apple.com>
257
258         Turn some not-so-rare ElementRareData bits into Node flags.
259         <https://webkit.org/b/124275>
260
261         The following 4 bits seem to be the most commonly set:
262
263         - childrenAffectedByHover()
264         - childrenAffectedByFirstChildRules()
265         - childrenAffectedByLastChildRules()
266         - childrenAffectedByDirectAdjacentRules()
267
268         Turning them into Node flags means we don't have to allocate full
269         ElementRareData object in many cases. I also took this opportunity
270         to make Node's flag twiddling functions available to subclasses.
271
272         1.38 MB progression on HTML5-8266 locally.
273
274         Reviewed by Antti Koivisto.
275
276 2013-11-13  Tibor Meszaros  <mtibor@inf.u-szeged.hu>
277
278         Cleanup the build from unused parameters in WebCore
279         https://bugs.webkit.org/show_bug.cgi?id=124199.
280
281         Reviewed by Csaba Osztrogonác.
282
283         * css/CSSCursorImageValue.cpp:
284         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
285         * dom/Document.cpp:
286         (WebCore::Document::scriptedAnimationControllerSetThrottled):
287         * fileapi/ThreadableBlobRegistry.cpp:
288         (WebCore::ThreadableBlobRegistry::registerBlobURL):
289         * html/HTMLAnchorElement.cpp:
290         (WebCore::shouldProhibitLinks):
291         * html/parser/XSSAuditor.cpp:
292         (WebCore::isSemicolonSeparatedAttribute):
293         * inspector/InspectorConsoleInstrumentation.h:
294         (WebCore::InspectorInstrumentation::addMessageToConsole):
295         * loader/DocumentThreadableLoader.cpp:
296         (WebCore::DocumentThreadableLoader::didReceiveData):
297         (WebCore::DocumentThreadableLoader::didFail):
298         (WebCore::DocumentThreadableLoader::preflightFailure):
299         * loader/cache/CachedImage.cpp:
300         (WebCore::CachedImage::imageSizeForRenderer):
301         * page/animation/ImplicitAnimation.cpp:
302         (WebCore::ImplicitAnimation::animate):
303         * page/animation/KeyframeAnimation.cpp:
304         (WebCore::KeyframeAnimation::animate):
305         * platform/graphics/WidthIterator.cpp:
306         (WebCore::applyFontTransforms):
307         * rendering/RenderView.cpp:
308         (WebCore::RenderView::setIsInWindow):
309         * rendering/style/RenderStyle.cpp:
310         (WebCore::RenderStyle::changeRequiresLayout):
311         (WebCore::RenderStyle::changeRequiresLayerRepaint):
312         (WebCore::RenderStyle::changeRequiresRecompositeLayer):
313         * testing/Internals.cpp:
314         (WebCore::Internals::setHeaderHeight):
315         (WebCore::Internals::setCaptionsStyleSheetOverride):
316
317 2013-11-13  Andreas Kling  <akling@apple.com>
318
319         Refalize CSSCursorImageValue.
320         <https://webkit.org/b/124272>
321
322         Make CSSCursorImageValue constructor return a PassRef, and have it
323         take the image CSSValue as a PassRef (and store it internally in a
324         Ref<CSSValue>.)
325
326         Had to add a Ref version of compareCSSValuePtr() to make this work.
327
328         Reviewed by Antti Koivisto.
329
330 2013-11-13  Andreas Kling  <akling@apple.com>
331
332         RenderTableSection: Cell structures don't need allocation padding.
333         <https://webkit.org/b/124263>
334
335         The row structure data gets shrunk-to-fit once we get to layout,
336         but per-row cell structures get no such luxury. Fortuntely we know
337         ahead of time how many cells a row needs to accomodate, so we can
338         just use Vector::resizeToFit() instead of Vector::grow().
339
340         1.25 MB progression on HTML5-8266 locally.
341
342         Reviewed by Antti Koivisto.
343
344 2013-11-13  Andreas Kling  <akling@apple.com>
345
346         Avoid unnecessarily padding the FontDescription families vector.
347         <https://webkit.org/b/124267>
348
349         Use a bit of reserveInitialCapacity+uncheckedAppend grease to avoid
350         jumping all the way to capacity=16 when a style has more than just
351         a single font-family in it.
352
353         130 kB progression on HTML5-8266 locally.
354
355         Reviewed by Antti Koivisto.
356
357         * css/DeprecatedStyleBuilder.cpp:
358         (WebCore::ApplyPropertyFontFamily::applyValue):
359
360 2013-11-13  Andreas Kling  <akling@apple.com>
361
362         Make remaining CSSPrimitiveValue constructors return PassRef.
363         <https://webkit.org/b/124270>
364
365         ..and same with the corresponding CSSValuePool functions.
366
367         Reviewed by Antti Koivisto.
368
369 2013-11-13  Alexey Proskuryakov  <ap@apple.com>
370
371         Implement key generation and JWK import for RSASSA-PKCS1-v1_5
372         https://bugs.webkit.org/show_bug.cgi?id=124236
373
374         Reviewed by Sam Weinig.
375
376         Tests: crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html
377                crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html
378
379         * WebCore.xcodeproj/project.pbxproj: Added new files.
380
381         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
382         (WebCore::JSCryptoAlgorithmBuilder::add):
383         * bindings/js/JSCryptoAlgorithmBuilder.h:
384         * crypto/CryptoAlgorithmDescriptionBuilder.h:
385         Added a way to add an Uint8Array, as needed for RSA key.algorithm.publicExponent.
386
387         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
388         (WebCore::createAesCbcParams): Removed unneeded JSC prefixes.
389         (WebCore::createAesKeyGenParams): Ditto.
390         (WebCore::createHmacParams): Ditto.
391         (WebCore::createHmacKeyParams): Ditto.
392         (WebCore::createRsaKeyGenParams): Added. 
393         (WebCore::createRsaSsaKeyParams): Added. WebCrypto currently doesn't specify any
394         parameters for importKey, so the structure remains blank (unlike with JWK).
395         (WebCore::createRsaSsaParams): Added (currently unused, will be sued for sign/verify soon).
396         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Removed unneeded JSC prefixes.
397         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
398         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): Added support for RSAES_PKCS1_v1_5.
399         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): Ditto.
400         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): Removed unneeded JSC prefixes.
401         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Ditto.
402         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): Ditto.
403         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): Ditto.
404         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Added support for RSAES_PKCS1_v1_5.
405         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Removed unneeded JSC prefixes.
406         (WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey): Ditto.
407         (WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey): Ditto.
408
409         * bindings/js/JSCryptoKeySerializationJWK.h:
410         * bindings/js/JSCryptoKeySerializationJWK.cpp:
411         (WebCore::getJSArrayFromJSON): Added.
412         (WebCore::getBigIntegerVectorFromJSON): Added.
413         (WebCore::createRSASSAKeyParameters): Create parameters for key import. The key
414         will remember which algorithm it's allowed to be used with.
415         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): Added support for
416         RS256...RS512 (tha is, RSAES_PKCS1_v1_5 with SHA-256...SHA-512).
417         (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence): Split out of keyData().
418         (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Added code to read
419         RSA key components from JWK.
420         (WebCore::JSCryptoKeySerializationJWK::keyData): Call one of the above functions.
421
422         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Added.
423         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
424         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
425         Placeholders.
426
427         * crypto/CryptoKey.h: (WebCore::CryptoKeyClass): Added RSA key class for poor man's RTTI.
428
429         * crypto/CryptoKeyData.h: (WebCore::CryptoKeyData::FormatRSAComponents): Added RSAComponents
430         for poor man's RTTI.
431
432         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::importKey): 
433         * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::importKey):
434         * crypto/keys/CryptoKeyAES.h:
435         (WebCore::isCryptoKeyAES):
436         (WebCore::toCryptoKeyAES):
437         * crypto/keys/CryptoKeyDataOctetSequence.h:
438         (WebCore::toCryptoKeyDataOctetSequence):
439         * crypto/keys/CryptoKeyHMAC.h:
440         (WebCore::isCryptoKeyHMAC):
441         (WebCore::toCryptoKeyHMAC):
442         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
443         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
444         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
445         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
446         (WebCore::CryptoAlgorithmHMAC::sign):
447         (WebCore::CryptoAlgorithmHMAC::verify):
448         Switched from "as" functions to "is" and "to" ones, as that's more idiomatic.
449
450         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Added.
451         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Added.
452         Glue code for importKey/generateKey for now.
453
454         * crypto/keys/CryptoKeyDataRSAComponents.cpp: Added.
455         (WebCore::CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents):
456         (WebCore::CryptoKeyDataRSAComponents::~CryptoKeyDataRSAComponents):
457         * crypto/keys/CryptoKeyDataRSAComponents.h: Added.
458         (WebCore::toCryptoKeyDataRSAComponents):
459         Added a structure to hold RSA key components, extracted from JWK or another format.
460
461         * crypto/keys/CryptoKeyRSA.h: Added.
462         * crypto/mac/CryptoKeyRSAMac.cpp: Added.
463
464         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
465         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
466         Register RSASSA_PKCS1_v1_5.
467
468         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added a constructor to make
469         sure that hasLength is never left uninitialized, even when reading formats that
470         don't contain a length.
471
472         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Added.
473         * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Added.
474         * crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Added.
475         Added parameter structures that are needed for RSASSA_PKCS1_v1_5.
476
477 2013-11-12  Alexey Proskuryakov  <ap@apple.com>
478
479         Disable WebCrypto on Mountain Lion
480         https://bugs.webkit.org/show_bug.cgi?id=124261
481
482         Rubber-stamped by Sam Weinig.
483
484         * Configurations/FeatureDefines.xcconfig:
485
486 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
487
488         Manage XMLHttpRequestUpload, XSLImportRule, XMLErrors, XML pending callback classes through std::unique_ptr
489         https://bugs.webkit.org/show_bug.cgi?id=124224
490
491         Reviewed by Anders Carlsson.
492
493         Use std::unique_ptr to handle objects of various XML classes that were previously managed by OwnPtr.
494         This removes usage of OwnPtr and PassOwnPtr under Source/WebCore/xml/.
495
496         * xml/XMLHttpRequest.cpp:
497         (WebCore::XMLHttpRequest::upload):
498         * xml/XMLHttpRequest.h:
499         * xml/XMLHttpRequestUpload.h:
500         * xml/XSLImportRule.h:
501         * xml/XSLStyleSheet.h:
502         * xml/XSLStyleSheetLibxslt.cpp:
503         (WebCore::XSLStyleSheet::loadChildSheet):
504         * xml/parser/XMLDocumentParser.cpp:
505         (WebCore::XMLDocumentParser::handleError):
506         * xml/parser/XMLDocumentParser.h:
507         * xml/parser/XMLDocumentParserLibxml2.cpp:
508         (WebCore::PendingCallbacks::PendingCallbacks):
509         (WebCore::PendingCallbacks::appendStartElementNSCallback):
510         (WebCore::PendingCallbacks::appendEndElementNSCallback):
511         (WebCore::PendingCallbacks::appendCharactersCallback):
512         (WebCore::PendingCallbacks::appendProcessingInstructionCallback):
513         (WebCore::PendingCallbacks::appendCDATABlockCallback):
514         (WebCore::PendingCallbacks::appendCommentCallback):
515         (WebCore::PendingCallbacks::appendInternalSubsetCallback):
516         (WebCore::PendingCallbacks::appendErrorCallback):
517         (WebCore::PendingCallbacks::callAndRemoveFirstCallback):
518         (WebCore::XMLDocumentParser::XMLDocumentParser):
519
520 2013-11-12  Brady Eidson  <beidson@apple.com>
521
522         Move basic IDBBackingStoreTransaction operations to IDBServerConnection
523         https://bugs.webkit.org/show_bug.cgi?id=124244
524
525         Reviewed by Tim Horton (and unofficially Anders Carlsson).
526
527         This patch:
528         - Makes IDBBackingStore the owner of an IDBBackingStoreTransaction.
529         - Adds the integer transaction ID to IDBBackingStoreTransaction for reference.
530         - Removes IDBTransactionBackend’s reliance on IDBBackingStoreTransaction by moving
531           necessary methods to IDBServerConnection.
532         - Renames the IDBTransactionBackend::backingStoreTransaction() accessor to
533           deprecatedBackingStoreTransaction to make it clear it’s on the way out.
534
535         * Modules/indexeddb/IDBBackingStoreInterface.h:
536
537         * Modules/indexeddb/IDBDatabaseBackend.cpp:
538         (WebCore::IDBDatabaseBackend::setIndexKeys):
539
540         * Modules/indexeddb/IDBServerConnection.h:
541
542         * Modules/indexeddb/IDBTransactionBackend.cpp:
543         (WebCore::IDBTransactionBackend::IDBTransactionBackend):
544         (WebCore::IDBTransactionBackend::~IDBTransactionBackend):
545         (WebCore::IDBTransactionBackend::deprecatedBackingStoreTransaction):
546         (WebCore::IDBTransactionBackend::scheduleTask):
547         (WebCore::IDBTransactionBackend::abort):
548         (WebCore::IDBTransactionBackend::commit):
549         (WebCore::IDBTransactionBackend::taskTimerFired):
550         * Modules/indexeddb/IDBTransactionBackend.h:
551
552         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
553         (WebCore::CreateObjectStoreOperation::perform):
554         (WebCore::CreateIndexOperation::perform):
555         (WebCore::DeleteIndexOperation::perform):
556         (WebCore::GetOperation::perform):
557         (WebCore::PutOperation::perform):
558         (WebCore::OpenCursorOperation::perform):
559         (WebCore::CountOperation::perform):
560         (WebCore::DeleteRangeOperation::perform):
561         (WebCore::ClearOperation::perform):
562         (WebCore::DeleteObjectStoreOperation::perform):
563         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
564
565         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
566         (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
567         (WebCore::IDBBackingStoreLevelDB::generateKey):
568         (WebCore::IDBBackingStoreLevelDB::updateKeyGenerator):
569         (WebCore::IDBBackingStoreLevelDB::establishBackingStoreTransaction):
570         (WebCore::IDBBackingStoreLevelDB::deprecatedBackingStoreTransaction):
571         (WebCore::IDBBackingStoreLevelDB::removeBackingStoreTransaction):
572         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
573
574         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp:
575         (WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
576         (WebCore::IDBBackingStoreTransactionLevelDB::~IDBBackingStoreTransactionLevelDB):
577         (WebCore::IDBBackingStoreTransactionLevelDB::resetTransaction):
578         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
579
580         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
581         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
582         (WebCore::IDBServerConnectionLevelDB::deprecatedBackingStoreTransaction):
583         (WebCore::IDBServerConnectionLevelDB::openTransaction):
584         (WebCore::IDBServerConnectionLevelDB::beginTransaction):
585         (WebCore::IDBServerConnectionLevelDB::commitTransaction):
586         (WebCore::IDBServerConnectionLevelDB::resetTransaction):
587         (WebCore::IDBServerConnectionLevelDB::rollbackTransaction):
588         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
589
590 2013-11-12  Andy Estes  <aestes@apple.com>
591
592         Fix the Mountain Lion build after r159171.
593
594         * platform/mac/HTMLConverter.mm:
595         (_dateForString): +[NSCalendar calendarWithIdentifier:] only exists on
596         10.9. Use -[NSCalendar initWithIdentifier:] instead.
597
598 2013-11-12  Andy Estes  <aestes@apple.com>
599
600         [Mac] Fix some deprecation warnings
601         https://bugs.webkit.org/show_bug.cgi?id=124252
602
603         Reviewed by Mark Rowe.
604
605         * loader/archive/cf/LegacyWebArchive.cpp:
606         (WebCore::LegacyWebArchive::create): Use CFPropertyListCreateWithData()
607         instead of CFPropertyListCreateFromXMLData().
608         (WebCore::LegacyWebArchive::rawDataRepresentation): Use
609         CFPropertyListWrite() instead of CFPropertyListWriteToStream().
610         * platform/mac/HTMLConverter.mm:
611         (_dateForString): Rewrite this method in terms of NSDateComponents and
612         NSCalendar instead of using CFGregorianDate.
613
614 2013-11-12  Commit Queue  <commit-queue@webkit.org>
615
616         Unreviewed, rolling out r159160, r159161, and r159164.
617         http://trac.webkit.org/changeset/159160
618         http://trac.webkit.org/changeset/159161
619         http://trac.webkit.org/changeset/159164
620         https://bugs.webkit.org/show_bug.cgi?id=124253
621
622         Too many errors (make fewer) (Requested by ap on #webkit).
623
624         * WebCore.xcodeproj/project.pbxproj:
625         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
626         * bindings/js/JSCryptoAlgorithmBuilder.h:
627         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
628         (WebCore::createAesCbcParams):
629         (WebCore::createAesKeyGenParams):
630         (WebCore::createHmacParams):
631         (WebCore::createHmacKeyParams):
632         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
633         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
634         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
635         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
636         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
637         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
638         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
639         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
640         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
641         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
642         (WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey):
643         (WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey):
644         * bindings/js/JSCryptoKeySerializationJWK.cpp:
645         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
646         (WebCore::JSCryptoKeySerializationJWK::keyData):
647         * bindings/js/JSCryptoKeySerializationJWK.h:
648         * crypto/CryptoAlgorithmDescriptionBuilder.h:
649         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Removed.
650         * crypto/CryptoKey.h:
651         (WebCore::ENUM_CLASS):
652         * crypto/CryptoKeyData.h:
653         (WebCore::CryptoKeyData::ENUM_CLASS):
654         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
655         (WebCore::CryptoAlgorithmAES_CBC::importKey):
656         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
657         (WebCore::CryptoAlgorithmHMAC::importKey):
658         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Removed.
659         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Removed.
660         * crypto/keys/CryptoKeyAES.h:
661         (WebCore::asCryptoKeyAES):
662         * crypto/keys/CryptoKeyDataOctetSequence.h:
663         (WebCore::asCryptoKeyDataOctetSequence):
664         * crypto/keys/CryptoKeyDataRSAComponents.cpp: Removed.
665         * crypto/keys/CryptoKeyDataRSAComponents.h: Removed.
666         * crypto/keys/CryptoKeyHMAC.h:
667         (WebCore::asCryptoKeyHMAC):
668         * crypto/keys/CryptoKeyRSA.h: Removed.
669         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
670         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
671         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
672         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
673         (WebCore::CryptoAlgorithmHMAC::sign):
674         (WebCore::CryptoAlgorithmHMAC::verify):
675         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
676         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
677         * crypto/mac/CryptoKeyRSAMac.cpp: Removed.
678         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
679         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Removed.
680         * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Removed.
681         * crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Removed.
682
683 2013-11-12  Bem Jones-Bey  <bjonesbe@adobe.com>
684
685         Make the placed floats tree use LayoutUnit instead of int
686         https://bugs.webkit.org/show_bug.cgi?id=124207
687
688         Reviewed by Alexandru Chiculita.
689
690         The dimensions of floats are in LayoutUnits, so it doesn't make sense
691         to be converting to ints for use in the placed floats tree.
692
693         Also add missed "explicit" to single argument FloatingObjects
694         constructor.
695
696         No new tests, no behavior change.
697
698         * rendering/FloatingObjects.cpp:
699         (WebCore::rangesIntersect):
700         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
701         (WebCore::ComputeFloatOffsetAdapter::lowValue):
702         (WebCore::ComputeFloatOffsetAdapter::highValue):
703         (WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
704         (WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
705         (WebCore::FindNextFloatLogicalBottomAdapter::highValue):
706         * rendering/FloatingObjects.h:
707         * rendering/RenderFlowThread.h:
708
709 2013-11-12  Alexey Proskuryakov  <ap@apple.com>
710
711         Implement key generation and JWK import for RSASSA-PKCS1-v1_5
712         https://bugs.webkit.org/show_bug.cgi?id=124236
713
714         Build fix.
715
716         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::buildAlgorithmDescription):
717         ifdef out some code on Mountain Lion. Bug 124249 track fixing this.
718
719 2013-11-12  Joseph Pecoraro  <pecoraro@apple.com>
720
721         Web Inspector: Extract InspectorAgentRegistry from InspectorBaseAgent
722         https://bugs.webkit.org/show_bug.cgi?id=124190
723
724         Reviewed by Timothy Hatcher.
725
726         * CMakeLists.txt:
727         * GNUmakefile.list.am:
728         * WebCore.vcxproj/WebCore.vcxproj:
729         * WebCore.vcxproj/WebCore.vcxproj.filters:
730         * WebCore.xcodeproj/project.pbxproj:
731         * inspector/InspectorAgentRegistry.cpp: Added.
732         (WebCore::InspectorAgentRegistry::append):
733         (WebCore::InspectorAgentRegistry::setFrontend):
734         (WebCore::InspectorAgentRegistry::clearFrontend):
735         (WebCore::InspectorAgentRegistry::registerInDispatcher):
736         (WebCore::InspectorAgentRegistry::discardAgents):
737         * inspector/InspectorAgentRegistry.h: Added.
738         * inspector/InspectorAllInOne.cpp:
739         * inspector/InspectorBaseAgent.cpp: Removed.
740         * inspector/InspectorBaseAgent.h:
741         (WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface):
742         (WebCore::InspectorBaseAgentInterface::~InspectorBaseAgentInterface):
743         * inspector/InspectorController.h:
744         * inspector/InspectorMemoryAgent.h:
745         * inspector/WorkerInspectorController.h:
746
747 2013-11-12  Alexey Proskuryakov  <ap@apple.com>
748
749         Implement key generation and JWK import for RSASSA-PKCS1-v1_5
750         https://bugs.webkit.org/show_bug.cgi?id=124236
751
752         Release build fix.
753
754         * bindings/js/JSCryptoAlgorithmBuilder.cpp: Include TypedArrayInlines.h
755
756 2013-11-12  Alexey Proskuryakov  <ap@apple.com>
757
758         Implement key generation and JWK import for RSASSA-PKCS1-v1_5
759         https://bugs.webkit.org/show_bug.cgi?id=124236
760
761         Reviewed by Sam Weinig.
762
763         Tests: crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html
764                crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html
765
766         * WebCore.xcodeproj/project.pbxproj: Added new files.
767
768         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
769         (WebCore::JSCryptoAlgorithmBuilder::add):
770         * bindings/js/JSCryptoAlgorithmBuilder.h:
771         * crypto/CryptoAlgorithmDescriptionBuilder.h:
772         Added a way to add an Uint8Array, as needed for RSA key.algorithm.publicExponent.
773
774         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
775         (WebCore::createAesCbcParams): Removed unneeded JSC prefixes.
776         (WebCore::createAesKeyGenParams): Ditto.
777         (WebCore::createHmacParams): Ditto.
778         (WebCore::createHmacKeyParams): Ditto.
779         (WebCore::createRsaKeyGenParams): Added. 
780         (WebCore::createRsaSsaKeyParams): Added. WebCrypto currently doesn't specify any
781         parameters for importKey, so the structure remains blank (unlike with JWK).
782         (WebCore::createRsaSsaParams): Added (currently unused, will be sued for sign/verify soon).
783         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Removed unneeded JSC prefixes.
784         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
785         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): Added support for RSAES_PKCS1_v1_5.
786         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): Ditto.
787         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): Removed unneeded JSC prefixes.
788         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Ditto.
789         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): Ditto.
790         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): Ditto.
791         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Added support for RSAES_PKCS1_v1_5.
792         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Removed unneeded JSC prefixes.
793         (WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey): Ditto.
794         (WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey): Ditto.
795
796         * bindings/js/JSCryptoKeySerializationJWK.h:
797         * bindings/js/JSCryptoKeySerializationJWK.cpp:
798         (WebCore::getJSArrayFromJSON): Added.
799         (WebCore::getBigIntegerVectorFromJSON): Added.
800         (WebCore::createRSASSAKeyParameters): Create parameters for key import. The key
801         will remember which algorithm it's allowed to be used with.
802         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): Added support for
803         RS256...RS512 (tha is, RSAES_PKCS1_v1_5 with SHA-256...SHA-512).
804         (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence): Split out of keyData().
805         (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Added code to read
806         RSA key components from JWK.
807         (WebCore::JSCryptoKeySerializationJWK::keyData): Call one of the above functions.
808
809         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Added.
810         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
811         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
812         Placeholders.
813
814         * crypto/CryptoKey.h: (WebCore::CryptoKeyClass): Added RSA key class for poor man's RTTI.
815
816         * crypto/CryptoKeyData.h: (WebCore::CryptoKeyData::FormatRSAComponents): Added RSAComponents
817         for poor man's RTTI.
818
819         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::importKey): 
820         * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::importKey):
821         * crypto/keys/CryptoKeyAES.h:
822         (WebCore::isCryptoKeyAES):
823         (WebCore::toCryptoKeyAES):
824         * crypto/keys/CryptoKeyDataOctetSequence.h:
825         (WebCore::toCryptoKeyDataOctetSequence):
826         * crypto/keys/CryptoKeyHMAC.h:
827         (WebCore::isCryptoKeyHMAC):
828         (WebCore::toCryptoKeyHMAC):
829         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
830         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
831         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
832         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
833         (WebCore::CryptoAlgorithmHMAC::sign):
834         (WebCore::CryptoAlgorithmHMAC::verify):
835         Switched from "as" functions to "is" and "to" ones, as that's more idiomatic.
836
837         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Added.
838         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Added.
839         Glue code for importKey/generateKey for now.
840
841         * crypto/keys/CryptoKeyDataRSAComponents.cpp: Added.
842         (WebCore::CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents):
843         (WebCore::CryptoKeyDataRSAComponents::~CryptoKeyDataRSAComponents):
844         * crypto/keys/CryptoKeyDataRSAComponents.h: Added.
845         (WebCore::toCryptoKeyDataRSAComponents):
846         Added a structure to hold RSA key components, extracted from JWK or another format.
847
848         * crypto/keys/CryptoKeyRSA.h: Added.
849         * crypto/mac/CryptoKeyRSAMac.cpp: Added.
850
851         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
852         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
853         Register RSASSA_PKCS1_v1_5.
854
855         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added a constructor to make
856         sure that hasLength is never left uninitialized, even when reading formats that
857         don't contain a length.
858
859         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Added.
860         * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Added.
861         * crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Added.
862         Added parameter structures that are needed for RSASSA_PKCS1_v1_5.
863
864 2013-11-12  Bem Jones-Bey  <bjonesbe@adobe.com>
865
866         Move ValueToString out to its own header file to remove duplication
867         https://bugs.webkit.org/show_bug.cgi?id=124237
868
869         Reviewed by Alexandru Chiculita.
870
871         The ValueToString struct is used in many places for debugging. Move it
872         out to its own header file to remove all the duplicated definitions
873         and make it possible for the specializations to be placed in the
874         header files with the implementation of the classes they print.
875
876         No new tests, no behavior change.
877
878         * GNUmakefile.list.am:
879         * WebCore.xcodeproj/project.pbxproj:
880         * html/HTMLMediaElement.h:
881         * platform/LayoutUnit.h:
882         * platform/PODInterval.h:
883         * platform/PODIntervalTree.h:
884         * platform/PODRedBlackTree.h:
885         * platform/ValueToString.h: Added.
886         * platform/graphics/FloatPolygon.h:
887         * rendering/FloatingObjects.cpp:
888         * rendering/FloatingObjects.h:
889         * rendering/RenderBlock.h:
890         * rendering/RenderBlockFlow.h:
891         * rendering/RenderFlowThread.h:
892
893 2013-11-11  David Hyatt  <hyatt@apple.com>
894
895         Make RenderBlockRareData be in a hashtable instead of being a member variable.
896         https://bugs.webkit.org/show_bug.cgi?id=124056
897
898         Reviewed by Anders Carlsson.
899
900         Right now RenderBlock has 4 bytes taken up by a m_rareData member that is almost
901         never allocated. This is better off in a separate hash, so that RenderBlock can
902         get 4 bytes back.
903         
904         Since RenderBlockFlow's rare data member was recently removed and folded into
905         RenderBlock, we need to undo that change and put the rare data member back in
906         RenderBlockFlow. RenderBlockFlowRareData inheriting from RenderBlockRareData
907         was not a good idea anyway, since RenderBlockFlows also very rarely need the
908         RenderBlockRareData members, and were thus paying a heavier cost when the rare
909         data was created than was necessary.
910  
911         * rendering/RenderBlock.cpp:
912         (WebCore::RenderBlockRareData::RenderBlockRareData):
913         (WebCore::RenderBlock::~RenderBlock):
914         (WebCore::RenderBlock::hasRareData):
915         (WebCore::getRareData):
916         (WebCore::ensureRareData):
917         (WebCore::RenderBlock::ensureShapeInsideInfo):
918         (WebCore::RenderBlock::shapeInsideInfo):
919         (WebCore::RenderBlock::setShapeInsideInfo):
920         (WebCore::RenderBlock::paginationStrut):
921         (WebCore::RenderBlock::pageLogicalOffset):
922         (WebCore::RenderBlock::setPaginationStrut):
923         (WebCore::RenderBlock::setPageLogicalOffset):
924         * rendering/RenderBlock.h:
925         * rendering/RenderBlockFlow.cpp:
926         (WebCore::RenderBlockFlow::setMaxMarginBeforeValues):
927         (WebCore::RenderBlockFlow::setMaxMarginAfterValues):
928         (WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
929         (WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
930         (WebCore::RenderBlockFlow::mustDiscardMarginBefore):
931         (WebCore::RenderBlockFlow::mustDiscardMarginAfter):
932         (WebCore::RenderBlockFlow::setBreakAtLineToAvoidWidow):
933         (WebCore::RenderBlockFlow::setDidBreakAtLineToAvoidWidow):
934         (WebCore::RenderBlockFlow::clearDidBreakAtLineToAvoidWidow):
935         (WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidow):
936         (WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
937         (WebCore::RenderBlockFlow::ensureRareBlockFlowData):
938         (WebCore::RenderBlockFlow::materializeRareBlockFlowData):
939         * rendering/RenderBlockFlow.h:
940         (WebCore::RenderBlockFlow::shouldBreakAtLineToAvoidWidow):
941         (WebCore::RenderBlockFlow::lineBreakToAvoidWidow):
942         (WebCore::RenderBlockFlow::didBreakAtLineToAvoidWidow):
943         (WebCore::RenderBlockFlow::lineGridBox):
944         (WebCore::RenderBlockFlow::setLineGridBox):
945         (WebCore::RenderBlockFlow::renderNamedFlowFragment):
946         (WebCore::RenderBlockFlow::maxPositiveMarginBefore):
947         (WebCore::RenderBlockFlow::maxNegativeMarginBefore):
948         (WebCore::RenderBlockFlow::maxPositiveMarginAfter):
949         (WebCore::RenderBlockFlow::maxNegativeMarginAfter):
950         (WebCore::RenderBlockFlow::initMaxMarginValues):
951         (WebCore::RenderBlockFlow::hasRareBlockFlowData):
952         (WebCore::RenderBlockFlow::rareBlockFlowData):
953
954 2013-11-12  Alex Christensen  <achristensen@webkit.org>
955
956         Build GStreamer files on Windows.
957         https://bugs.webkit.org/show_bug.cgi?id=124180
958
959         Reviewed by Brent Fulgham.
960
961         * WebCore.vcxproj/WebCore.vcxproj:
962         * WebCore.vcxproj/WebCore.vcxproj.filters:
963         * WebCore.vcxproj/copyForwardingHeaders.cmd:
964         Include gstreamer files in WinCairo build.
965
966 2013-11-12  Brady Eidson  <beidson@apple.com>
967
968         Introduce IDBServerConnection (and start moving things to it).
969         https://bugs.webkit.org/show_bug.cgi?id=124193
970
971         Reviewed by Alexey Proskuryakov.
972
973         IDBServerConnection will be a purely asynchronous interface for database connections, transactions, and cursors.
974         Its interface will be 100% asynchronous and callback based - Perfect for an IPC divide.
975         Eventually none of the IDB<Foo>Backend classes will need IDBBackingStore<Foo> classes at all, 
976         and they’ll all use IDBServerConnection directly.
977
978         * CMakeLists.txt:
979         * GNUmakefile.list.am:
980         * WebCore.xcodeproj/project.pbxproj:
981
982         * Modules/indexeddb/IDBServerConnection.h: Added.
983         (WebCore::IDBServerConnection::~IDBServerConnection):
984
985         Concrete implementation that - for now - wraps an IDBBackingStoreLevelDB:
986         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Added.
987         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
988         (WebCore::IDBServerConnectionLevelDB::deprecatedBackingStore):
989         (WebCore::IDBServerConnectionLevelDB::isClosed):
990         (WebCore::IDBServerConnectionLevelDB::getOrEstablishIDBDatabaseMetadata):
991         (WebCore::IDBServerConnectionLevelDB::deleteDatabase):
992         (WebCore::IDBServerConnectionLevelDB::close):
993         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Added.
994
995         LevelDB created databases get LevelDB server connections:
996         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
997         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
998         (WebCore::IDBFactoryBackendLevelDB::open):
999
1000         Replace most uses of IDBBackingStore with server connection:
1001         * Modules/indexeddb/IDBDatabaseBackend.cpp:
1002         (WebCore::IDBDatabaseBackend::create):
1003         (WebCore::IDBDatabaseBackend::IDBDatabaseBackend):
1004         (WebCore::IDBDatabaseBackend::openInternalAsync):
1005         (WebCore::IDBDatabaseBackend::setIndexKeys):
1006         (WebCore::IDBDatabaseBackend::openConnectionInternal):
1007         (WebCore::IDBDatabaseBackend::deleteDatabaseAsync):
1008         (WebCore::IDBDatabaseBackend::close):
1009         * Modules/indexeddb/IDBDatabaseBackend.h:
1010         (WebCore::IDBDatabaseBackend::serverConnection):
1011
1012         Change all the operations to access their DatabaseBackend’s server connection instead
1013         if hanging on to a backing store directly:
1014         * Modules/indexeddb/IDBTransactionBackend.cpp:
1015         (WebCore::IDBTransactionBackend::IDBTransactionBackend):
1016         (WebCore::IDBTransactionBackend::scheduleCreateObjectStoreOperation):
1017         (WebCore::IDBTransactionBackend::scheduleDeleteObjectStoreOperation):
1018         (WebCore::IDBTransactionBackend::scheduleCreateIndexOperation):
1019         (WebCore::IDBTransactionBackend::scheduleDeleteIndexOperation):
1020         (WebCore::IDBTransactionBackend::scheduleGetOperation):
1021         (WebCore::IDBTransactionBackend::schedulePutOperation):
1022         (WebCore::IDBTransactionBackend::scheduleOpenCursorOperation):
1023         (WebCore::IDBTransactionBackend::scheduleCountOperation):
1024         (WebCore::IDBTransactionBackend::scheduleDeleteRangeOperation):
1025         (WebCore::IDBTransactionBackend::scheduleClearOperation):
1026         * Modules/indexeddb/IDBTransactionBackend.h:
1027
1028         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1029         (WebCore::CreateObjectStoreOperation::perform):
1030         (WebCore::CreateIndexOperation::perform):
1031         (WebCore::DeleteIndexOperation::perform):
1032         (WebCore::GetOperation::perform):
1033         (WebCore::PutOperation::perform):
1034         (WebCore::OpenCursorOperation::perform):
1035         (WebCore::CountOperation::perform):
1036         (WebCore::DeleteRangeOperation::perform):
1037         (WebCore::ClearOperation::perform):
1038         (WebCore::DeleteObjectStoreOperation::perform):
1039         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
1040         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1041         (WebCore::CreateObjectStoreOperation::create):
1042         (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
1043         (WebCore::DeleteObjectStoreOperation::create):
1044         (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
1045         (WebCore::CreateIndexOperation::create):
1046         (WebCore::CreateIndexOperation::CreateIndexOperation):
1047         (WebCore::DeleteIndexOperation::create):
1048         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
1049         (WebCore::GetOperation::create):
1050         (WebCore::GetOperation::GetOperation):
1051         (WebCore::PutOperation::create):
1052         (WebCore::PutOperation::PutOperation):
1053         (WebCore::OpenCursorOperation::create):
1054         (WebCore::OpenCursorOperation::OpenCursorOperation):
1055         (WebCore::CountOperation::create):
1056         (WebCore::CountOperation::CountOperation):
1057         (WebCore::DeleteRangeOperation::create):
1058         (WebCore::DeleteRangeOperation::DeleteRangeOperation):
1059         (WebCore::ClearOperation::create):
1060         (WebCore::ClearOperation::ClearOperation):
1061         * Modules/indexeddb/IDBTransactionCoordinator.h:
1062
1063 2013-11-12  Brent Fulgham  <bfulgham@apple.com>
1064
1065         [Win] Unreviewed gardening.
1066
1067         * WebCore.vcxproj/WebCore.vcxproj.filters: Correct filter file so that source
1068         files show up in their proper directories in Visual Studio.
1069
1070 2013-11-12  Alex Christensen  <achristensen@webkit.org>
1071
1072         [WinCairo] Preparation for ENABLE(VIDEO).
1073         https://bugs.webkit.org/show_bug.cgi?id=57420
1074
1075         Reviewed by Martin Robinson.
1076
1077         * platform/FileSystem.h:
1078         * platform/graphics/MediaPlayer.cpp:
1079         * rendering/RenderMediaControls.cpp:
1080         * rendering/RenderThemeWin.cpp:
1081         (WebCore::RenderThemeWin::adjustSliderThumbSize):
1082         Separated CG code from GStreamer code.
1083
1084 2013-11-12  Tibor Meszaros  <mtibor@inf.u-szeged.hu>
1085
1086         Fix reported build warnings for GTK
1087         https://bugs.webkit.org/show_bug.cgi?id=123439
1088
1089         Reviewed by Carlos Garcia Campos.
1090
1091         There was a void method, that has return value in it's documentation, so I removed it.
1092
1093         * bindings/gobject/WebKitDOMCustom.h:
1094
1095 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
1096
1097         Manage StorageThread through std::unique_ptr
1098         https://bugs.webkit.org/show_bug.cgi?id=124197
1099
1100         Reviewed by Anders Carlsson.
1101
1102         New StorageThread objects are crafted through std::make_unique. This removes the need for the static
1103         StorageThread::create() method but requires that the StorageThread constructor is made public.
1104
1105         * storage/StorageSyncManager.cpp:
1106         (WebCore::StorageSyncManager::StorageSyncManager):
1107         * storage/StorageSyncManager.h:
1108         * storage/StorageThread.cpp:
1109         * storage/StorageThread.h:
1110         * storage/StorageTracker.cpp:
1111         (WebCore::StorageTracker::StorageTracker):
1112         * storage/StorageTracker.h:
1113
1114 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
1115
1116         Remove unnecessary PassOwnPtr.h header includes under Source/WebCore/fileapi
1117         https://bugs.webkit.org/show_bug.cgi?id=124196
1118
1119         Reviewed by Anders Carlsson.
1120
1121         PassOwnPtr is not used anywhere under Source/WebCore/fileapi/, so PassOwnPtr.h inclusions can be removed.
1122
1123         * fileapi/Blob.h:
1124         * fileapi/FileThread.h:
1125         * fileapi/FileThreadTask.h:
1126
1127 2013-11-12  Antti Koivisto  <antti@apple.com>
1128
1129         Text on simple lines sometimes paints one pixel off
1130         https://bugs.webkit.org/show_bug.cgi?id=124200
1131
1132         Reviewed by Andreas Kling.
1133
1134         Test: fast/text/line-runs-simple-lines.html
1135
1136         * rendering/SimpleLineLayout.cpp:
1137         (WebCore::SimpleLineLayout::adjustRunOffsets):
1138         
1139             Don't round on run construction time.
1140
1141         (WebCore::SimpleLineLayout::createTextRuns):
1142         * rendering/SimpleLineLayoutResolver.h:
1143         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
1144         
1145             Instead round when generating rects.
1146
1147         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
1148         
1149             Provide the baseline (used by painting) as unrounded FloatPoint.
1150
1151 2013-11-11  Andreas Kling  <akling@apple.com>
1152
1153         Elements with class names automatically get unique ElementData.
1154         <https://webkit.org/b/124184>
1155
1156         We were calling Element::ensureUniqueElementData() for all Elements
1157         with a non-empty list of class names. Doing that on parser-fresh
1158         Elements caused us to upgrade them to UniqueElementData despite not
1159         needing it (ElementData::setClass() is a const function for caching
1160         the "cooked" class and can be called on ShareableElementData.)
1161
1162         1.09 MB progression on HTML5 spec at <http://whatwg.org/c>
1163
1164         Reviewed by Antti Koivisto.
1165
1166 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
1167
1168         JSC bindings generator should generate deletable JSC functions
1169         https://bugs.webkit.org/show_bug.cgi?id=122422
1170
1171         Reviewed by Geoffrey Garen.
1172
1173         The JSC functions that the JSC bindings generator generates should be deletable to conform to
1174         the WebIDL specification, which instructs that the WebIDL operations must be configurable (which
1175         translates to the JSC functions being deletable).
1176
1177         The generator will still produce a non-deletable JSC function for operations under almost all
1178         Web-facing interfaces since they're annotated with the OperationsNotDeletable attribute. The
1179         exception here is the Node interface that is having the attribute removed, with the provided
1180         test case testing that all the functions on the Node prototype object are writable, enumerable
1181         and configurable. This behavior conforms to the WebIDL specification and the behaviors of IE
1182         and Firefox. Chrome at the moment still provides non-configurable functions.
1183
1184         Test: fast/dom/webidl-operations-on-node-prototype.html
1185
1186         * bindings/scripts/CodeGeneratorJS.pm:
1187         (GenerateImplementation): Enforce the non-deletable behavior of the JSC function if either the
1188         operation's interface is annotated with the OperationsNotDeletable attribute or the operation itself
1189         is annotated with the NotDeletable attribute.
1190         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Update the JSC generator test baselines.
1191         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
1192         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
1193         * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
1194         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
1195         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
1196         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
1197         * dom/Node.idl: Remove the OperationsNotDeletable attribute.
1198
1199 2013-11-11  Brady Eidson  <beidson@apple.com>
1200
1201         Make IDBTransaction tasks asynchronous
1202         https://bugs.webkit.org/show_bug.cgi?id=124183
1203
1204         Reviewed by Tim Horton.
1205
1206         This is an almost zero-change in behavior.
1207
1208         The one thing that is different is that previously, IDBTransactionBackends would synchronously
1209         run through their entire set of IDBOperation’s without ever returning control to the runloop.
1210
1211         Now, they start one task and then wait for its completion to schedule the start of the next task.
1212
1213         Change IDBOperation’s perform() to take a completion handler so it can be asynchronous.
1214         Add an IDBSynchronousOperation class to handle "Abort" tasks, which never need to perform i/o
1215         and therefore can be entirely synchronous.
1216         * Modules/indexeddb/IDBOperation.h:
1217         (WebCore::IDBSynchronousOperation::~IDBSynchronousOperation):
1218
1219         * Modules/indexeddb/IDBTransactionBackend.cpp:
1220         (WebCore::IDBTransactionBackend::scheduleTask): "Abort tasks" are now IDBSynchronousOperations.
1221         (WebCore::IDBTransactionBackend::abort):
1222         (WebCore::IDBTransactionBackend::taskTimerFired): Instead of running through the entire set of tasks,
1223           perform a single task asynchronously. The completion handler for the task will reset the task timer
1224           to asynchronously start the next task.
1225         * Modules/indexeddb/IDBTransactionBackend.h:
1226         (WebCore::IDBTransactionBackend::scheduleTask): "Abort tasks" are now IDBSynchronousOperations.
1227
1228         Update all operations to take completion handlers.
1229         For now, perform things synchronously like before, calling the completion handler when complete.
1230         * Modules/indexeddb/IDBCursorBackend.cpp:
1231         (WebCore::CallOnDestruct::CallOnDestruct): Helper class to make sure completion callbacks are always called perform() exits.
1232         (WebCore::CallOnDestruct::~CallOnDestruct):
1233         (WebCore::IDBCursorBackend::CursorIterationOperation::create):
1234         (WebCore::IDBCursorBackend::CursorAdvanceOperation::create):
1235         (WebCore::IDBCursorBackend::CursorPrefetchIterationOperation::create):
1236         (WebCore::IDBCursorBackend::CursorAdvanceOperation::perform):
1237         (WebCore::IDBCursorBackend::CursorIterationOperation::perform):
1238         (WebCore::IDBCursorBackend::CursorPrefetchIterationOperation::perform):
1239
1240         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1241         (WebCore::CallOnDestruct::CallOnDestruct): Helper class to make sure completion callbacks are always called when perform() exits.
1242         (WebCore::CallOnDestruct::~CallOnDestruct):
1243         (WebCore::CreateObjectStoreOperation::perform):
1244         (WebCore::CreateIndexOperation::perform):
1245         (WebCore::DeleteIndexOperation::perform):
1246         (WebCore::GetOperation::perform):
1247         (WebCore::PutOperation::perform):
1248         (WebCore::SetIndexesReadyOperation::perform):
1249         (WebCore::OpenCursorOperation::perform):
1250         (WebCore::CountOperation::perform):
1251         (WebCore::DeleteRangeOperation::perform):
1252         (WebCore::ClearOperation::perform):
1253         (WebCore::DeleteObjectStoreOperation::perform):
1254         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
1255
1256         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1257         (WebCore::CreateObjectStoreOperation::create):
1258         (WebCore::DeleteObjectStoreOperation::create):
1259         (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
1260         (WebCore::CreateObjectStoreAbortOperation::create):
1261         (WebCore::DeleteObjectStoreAbortOperation::create):
1262         (WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
1263         (WebCore::CreateIndexOperation::create):
1264         (WebCore::CreateIndexAbortOperation::create):
1265         (WebCore::DeleteIndexOperation::create):
1266         (WebCore::DeleteIndexAbortOperation::create):
1267         (WebCore::GetOperation::create):
1268         (WebCore::PutOperation::create):
1269         (WebCore::SetIndexesReadyOperation::create):
1270         (WebCore::OpenCursorOperation::create):
1271         (WebCore::CountOperation::create):
1272         (WebCore::DeleteRangeOperation::create):
1273         (WebCore::ClearOperation::create):
1274
1275 2013-11-11  Joseph Pecoraro  <pecoraro@apple.com>
1276
1277         Web Inspector: Remove some unused generated code
1278         https://bugs.webkit.org/show_bug.cgi?id=124179
1279
1280         Reviewed by Timothy Hatcher.
1281
1282         * inspector/CodeGeneratorInspectorStrings.py:
1283
1284 2013-11-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1285
1286         Clean up static_cast<Element*> usage
1287         https://bugs.webkit.org/show_bug.cgi?id=124133
1288
1289         Reviewed by Andreas Kling.
1290
1291         We need to use toFoo cast function instead of static_cast<>. Though there is toElement(),
1292         static_cast<Element*> is still being used.
1293
1294         No new tests, no behavior changes.
1295
1296         * bindings/gobject/WebKitDOMPrivate.cpp:
1297         (WebKit::wrap):
1298         * dom/ElementTraversal.h:
1299         (WebCore::::lastWithinTemplate):
1300         (WebCore::::nextTemplate):
1301         (WebCore::::previousTemplate):
1302
1303 2013-11-11  Anders Carlsson  <andersca@apple.com>
1304
1305         FrameFilter can just be an std::function instead
1306         https://bugs.webkit.org/show_bug.cgi?id=124176
1307
1308         Reviewed by Tim Horton.
1309
1310         * WebCore.exp.in:
1311         * loader/archive/cf/LegacyWebArchive.cpp:
1312         (WebCore::LegacyWebArchive::create):
1313         * loader/archive/cf/LegacyWebArchive.h:
1314
1315 2013-11-11  Simon Fraser  <simon.fraser@apple.com>
1316
1317         REGRESSION (r155660): box-shadow causes overlay scrollbars to be in the wrong position when element is composited (85647)
1318         https://bugs.webkit.org/show_bug.cgi?id=124090
1319
1320         Reviewed by Beth Dakin.
1321         
1322         After r155660 we did fewer layouts, so were left with overlay scrollbars in the
1323         wrong locations because nothing would update them after RenderLayerBacking
1324         computed a new offsetFromRenderer.
1325         
1326         First part of the fix is to wean positionOverflowControlsLayers() off of
1327         an absolute offset from the root. Do this by not using Widget::frameRect()
1328         to position the layers, but instead RenderLayer::rectFor{Horizontal|Vertical}Scrollbar
1329         which is what we used to position the scrollbars in the first place.
1330         
1331         Second part of the fix is to call positionOverflowControlsLayers() from
1332         RenderLayerBacking::updateGraphicsLayerGeometry() if the offsetFromRenderer
1333         changed.
1334
1335         Test: compositing/overflow/overflow-scrollbar-layer-positions.html
1336
1337         * rendering/RenderLayer.cpp:
1338         (WebCore::RenderLayer::positionOverflowControls):
1339         * rendering/RenderLayerBacking.cpp:
1340         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1341         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
1342         * rendering/RenderLayerBacking.h:
1343
1344 2013-11-11  Brent Fulgham  <bfulgham@apple.com>
1345
1346         [Win] m_isCompositeFontReference is uninitialized.
1347         https://bugs.webkit.org/show_bug.cgi?id=124170
1348
1349         Reviewed by Tim Horton.
1350
1351         Initialize value to false, as is done in the other constructors for this data type.
1352
1353         * platform/graphics/win/FontPlatformDataCGWin.cpp:
1354         (WebCore::FontPlatformData::FontPlatformData): 
1355         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
1356         (WebCore::FontPlatformData::FontPlatformData):
1357         * platform/graphics/win/FontPlatformDataWin.cpp:
1358         (WebCore::FontPlatformData::FontPlatformData):
1359
1360 2013-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
1361
1362         [Mac] Characters too close together in complex Arabic text
1363         https://bugs.webkit.org/show_bug.cgi?id=124057
1364
1365         Reviewed by Darin Adler.
1366
1367         We weren't updating our total width variable with run's initial
1368         advance information, leading to widths that were too narrow.
1369
1370         In addition, while initial advances for runs that aren't the first
1371         run are accounted for by baking in the initial advances into the
1372         previous character's advance, the initial advance for the first run
1373         has to be accounted for in ComplexTextController::offsetForPosition.
1374
1375         Test: fast/text/complex-grapheme-cluster-with-initial-advance.html
1376         Test: fast/text/selection-in-initial-advance-region.html
1377
1378         * platform/graphics/mac/ComplexTextController.cpp:
1379         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Update
1380         total width variable
1381         (WebCore::ComplexTextController::offsetOfPosition): Account for
1382         the first run's initial advance.
1383
1384 2013-11-11  Brady Eidson  <beidson@apple.com>
1385
1386         Make IDBBackingStoreTransaction be RefCounted
1387         https://bugs.webkit.org/show_bug.cgi?id=124168
1388
1389         Reviewed by Tim Horton.
1390
1391         This is necessarily to safely add a fully asynchronous interface into the IDB mechanism.
1392
1393         * Modules/indexeddb/IDBBackingStoreInterface.h:
1394         * Modules/indexeddb/IDBBackingStoreTransactionInterface.h:
1395         * Modules/indexeddb/IDBTransactionBackend.h:
1396
1397         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1398         (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
1399         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1400         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
1401
1402 2013-11-11  Antti Koivisto  <antti@apple.com>
1403
1404         End of line whitespace should collapse with white-space:pre-wrap; overflow-wrap:break-word in all cases
1405         https://bugs.webkit.org/show_bug.cgi?id=124158
1406
1407         Reviewed by Dave Hyatt.
1408         
1409         If a word just fits the line but the following space overflows we fail to collapse whitespaces 
1410         at the end of the line. This happens because with break-word we end up taking word breaking
1411         code path that does not have pre-wrap whitespace handling.
1412         
1413         This patch makes the behavior consistent and also matches Firefox.
1414
1415         Test: fast/text/break-word-pre-wrap.html
1416
1417         * rendering/RenderBlockLineLayout.cpp:
1418         (WebCore::BreakingContext::handleText):
1419         
1420             Don't take the word break code path if we are pre-wrap and the current character is space.
1421             Instead proceed to break the line normally as this is a valid break position.
1422
1423 2013-11-11  Bear Travis  <betravis@adobe.com>
1424
1425         Web Inspector: [CSS Shapes] Highlight shape-outside when its element is selected in the Web Inspector
1426         https://bugs.webkit.org/show_bug.cgi?id=124071
1427
1428         Reviewed by Timothy Hatcher.
1429
1430         Adding code to pass computed shape information (path and bounds) to the Inspector overlay
1431         canvas, and the code to display it. The code creates a path based on ShapeInfo's computed
1432         shape. The shape highlight draws whenever an element is highlighted, via selection in
1433         the Inspector elements view.
1434
1435         Test: inspector-protocol/model/highlight-shape-outside.html
1436
1437         * inspector/InspectorOverlay.cpp:
1438         (WebCore::localPointToRoot): Convert a local point to be relative to the root view.
1439         (WebCore::appendPathCommandAndPoints): Helper for building a single segment's worth
1440         of the overall path.
1441         (WebCore::appendPathSegment): Build a single segment's worth of the overall path.
1442         (WebCore::buildObjectForShapeOutside): Build an object to pass to the Inspector overlay
1443         that represents the shape.
1444         (WebCore::buildObjectForElementInfo): Call buildObjectForShapeOutside and pass the
1445         resulting object along.
1446         * inspector/InspectorOverlayPage.js:
1447         (pathCommand): Draw a single path command.
1448         (drawPath): Draw the overall path.
1449         (_drawShapeHighlight): Draw the highlight for the given shapeInfo.
1450         (drawNodeHighlight): Call _drawShapeHighlight.
1451         * rendering/shapes/PolygonShape.h:
1452         (WebCore::PolygonShape::polygon): Expose the underlying vertex information for a
1453         PolygonShape.
1454         * rendering/shapes/RasterShape.h:
1455         * rendering/shapes/RectangleShape.h:
1456         (WebCore::RectangleShape::logicalRx): Expose the logical radii for a shape.
1457         (WebCore::RectangleShape::logicalRy): Ditto.
1458         * rendering/shapes/Shape.h:
1459         * rendering/shapes/ShapeInfo.h:
1460         (WebCore::ShapeInfo::computedShapePhysicalBoundingBox): The physical bounds of a
1461         shape in renderer coordinates.
1462         (WebCore::ShapeInfo::shapeToRendererPoint): Convert shape coordinates to renderer
1463         coordinates.
1464         (WebCore::ShapeInfo::shapeToRendererSize): Ditto.
1465         (WebCore::ShapeInfo::ShapeInfo):
1466
1467 2013-11-11  Alexey Proskuryakov  <ap@apple.com>
1468
1469         Support WebCrypto KeyPair interface
1470         https://bugs.webkit.org/show_bug.cgi?id=124161
1471
1472         Reviewed by Geoffrey Garen.
1473
1474         No new tests yet, will be tested once generateKey is implemented for any RSA algorithms.
1475
1476         * CMakeLists.txt:
1477         * DerivedSources.make:
1478         * GNUmakefile.list.am:
1479         * WebCore.xcodeproj/project.pbxproj:
1480         Added new files.
1481
1482         * bindings/js/JSDOMPromise.h: Support returning a key pair via a promise.
1483
1484         * bindings/js/JSCryptoKeyPairCustom.cpp: Added.
1485         (WebCore::JSCryptoKeyPair::visitChildren):
1486         * crypto/CryptoKey.idl:
1487         CryptoKey wrapper is reachable through KeyPair, but it doesn't have (or need)
1488         a back pointer.
1489
1490         * crypto/CryptoKeyPair.cpp: Added.
1491         (WebCore::CryptoKeyPair::CryptoKeyPair):
1492         (WebCore::CryptoKeyPair::~CryptoKeyPair):
1493         * crypto/CryptoKeyPair.h: Added.
1494         (WebCore::CryptoKeyPair::create):
1495         (WebCore::CryptoKeyPair::publicKey):
1496         (WebCore::CryptoKeyPair::privateKey):
1497         * crypto/CryptoKeyPair.idl: Added.
1498
1499 2013-11-11  Nick Diego Yamane  <nick.yamane@openbossa.org>
1500
1501         Fix build after r158967
1502         https://bugs.webkit.org/show_bug.cgi?id=124160
1503
1504         Reviewed by Anders Carlsson.
1505
1506         After r158967, gcc debug builds with "-Werror=type-limits" enabled
1507         fail. This patch fixes it.
1508
1509         * rendering/shapes/RasterShape.h:
1510         (WebCore::RasterShapeIntervals::intervalsAt):
1511
1512 2013-11-11  Zan Dobersek  <zdobersek@igalia.com>
1513
1514         Remove the OperationsNotDeletable attribute from most of the WebIDL interfaces
1515         https://bugs.webkit.org/show_bug.cgi?id=124151
1516
1517         Reviewed by Geoffrey Garen.
1518
1519         The OperationsNotDeletable attribute currently doesn't have any effect, but will soon enforce
1520         non-configurability of operations on the interface that uses the attribute. Non-configurability
1521         of operations is the default behavior at the moment, but will be changed to follow the WebIDL
1522         specification which requires that the operations are configurable (i.e. -- in JSC terms -- deletable).
1523         IE and Firefox already exhibit this behavior in the majority of cases, while Chrome and Opera don't.
1524
1525         The attribute remains in use on the Location interface to mimic the Unforgeable attribute which
1526         also makes operations of an interface non-configurable. Unforgeable attribute will be used instead
1527         when support for it will be added to the JSC bindings generator.
1528
1529         * Modules/battery/BatteryManager.idl:
1530         * Modules/encryptedmedia/MediaKeySession.idl:
1531         * Modules/encryptedmedia/MediaKeys.idl:
1532         * Modules/gamepad/GamepadList.idl:
1533         * Modules/geolocation/Geolocation.idl:
1534         * Modules/indexeddb/IDBCursor.idl:
1535         * Modules/indexeddb/IDBDatabase.idl:
1536         * Modules/indexeddb/IDBFactory.idl:
1537         * Modules/indexeddb/IDBIndex.idl:
1538         * Modules/indexeddb/IDBKeyRange.idl:
1539         * Modules/indexeddb/IDBObjectStore.idl:
1540         * Modules/indexeddb/IDBTransaction.idl:
1541         * Modules/indexeddb/IDBVersionChangeEvent.idl:
1542         * Modules/mediacontrols/MediaControlsHost.idl:
1543         * Modules/mediasource/MediaSource.idl:
1544         * Modules/mediasource/SourceBuffer.idl:
1545         * Modules/mediasource/SourceBufferList.idl:
1546         * Modules/mediastream/MediaStream.idl:
1547         * Modules/mediastream/MediaStreamTrack.idl:
1548         * Modules/mediastream/RTCDTMFSender.idl:
1549         * Modules/mediastream/RTCDataChannel.idl:
1550         * Modules/mediastream/RTCPeerConnection.idl:
1551         * Modules/mediastream/RTCStatsReport.idl:
1552         * Modules/mediastream/RTCStatsResponse.idl:
1553         * Modules/networkinfo/NetworkInfoConnection.idl:
1554         * Modules/notifications/Notification.idl:
1555         * Modules/notifications/NotificationCenter.idl:
1556         * Modules/proximity/DeviceProximityEvent.idl:
1557         * Modules/quota/StorageInfo.idl:
1558         * Modules/quota/StorageQuota.idl:
1559         * Modules/speech/SpeechGrammarList.idl:
1560         * Modules/speech/SpeechRecognition.idl:
1561         * Modules/speech/SpeechRecognitionResult.idl:
1562         * Modules/speech/SpeechRecognitionResultList.idl:
1563         * Modules/speech/SpeechSynthesis.idl:
1564         * Modules/webaudio/AnalyserNode.idl:
1565         * Modules/webaudio/AudioBuffer.idl:
1566         * Modules/webaudio/AudioBufferSourceNode.idl:
1567         * Modules/webaudio/AudioContext.idl:
1568         * Modules/webaudio/AudioListener.idl:
1569         * Modules/webaudio/AudioNode.idl:
1570         * Modules/webaudio/AudioParam.idl:
1571         * Modules/webaudio/BiquadFilterNode.idl:
1572         * Modules/webaudio/OscillatorNode.idl:
1573         * Modules/webaudio/PannerNode.idl:
1574         * Modules/webdatabase/Database.idl:
1575         * Modules/webdatabase/DatabaseSync.idl:
1576         * Modules/webdatabase/SQLResultSetRowList.idl:
1577         * Modules/webdatabase/SQLTransaction.idl:
1578         * Modules/webdatabase/SQLTransactionSync.idl:
1579         * Modules/websockets/WebSocket.idl:
1580         * crypto/CryptoKey.idl:
1581         * crypto/SubtleCrypto.idl:
1582         * css/CSSHostRule.idl:
1583         * css/CSSMediaRule.idl:
1584         * css/CSSPrimitiveValue.idl:
1585         * css/CSSRuleList.idl:
1586         * css/CSSStyleDeclaration.idl:
1587         * css/CSSStyleSheet.idl:
1588         * css/CSSSupportsRule.idl:
1589         * css/CSSValueList.idl:
1590         * css/DOMWindowCSS.idl:
1591         * css/FontLoader.idl:
1592         * css/MediaList.idl:
1593         * css/MediaQueryList.idl:
1594         * css/MediaQueryListListener.idl:
1595         * css/StyleMedia.idl:
1596         * css/StyleSheet.idl:
1597         * css/StyleSheetList.idl:
1598         * css/WebKitCSSFilterValue.idl:
1599         * css/WebKitCSSKeyframesRule.idl:
1600         * css/WebKitCSSMatrix.idl:
1601         * css/WebKitCSSTransformValue.idl:
1602         * dom/CharacterData.idl:
1603         * dom/ChildNode.idl:
1604         * dom/ClientRectList.idl:
1605         * dom/Clipboard.idl:
1606         * dom/CompositionEvent.idl:
1607         * dom/CustomEvent.idl:
1608         * dom/DOMCoreException.idl:
1609         * dom/DOMImplementation.idl:
1610         * dom/DOMNamedFlowCollection.idl:
1611         * dom/DOMStringList.idl:
1612         * dom/DOMStringMap.idl:
1613         * dom/DataTransferItem.idl:
1614         * dom/DataTransferItemList.idl:
1615         * dom/DeviceMotionEvent.idl:
1616         * dom/DeviceOrientationEvent.idl:
1617         * dom/Document.idl:
1618         * dom/DocumentFragment.idl:
1619         * dom/DocumentType.idl:
1620         * dom/Element.idl:
1621         * dom/Event.idl:
1622         * dom/EventException.idl:
1623         * dom/EventListener.idl:
1624         * dom/EventTarget.idl:
1625         * dom/HashChangeEvent.idl:
1626         * dom/KeyboardEvent.idl:
1627         * dom/MessageEvent.idl:
1628         * dom/MessagePort.idl:
1629         * dom/MouseEvent.idl:
1630         * dom/MutationEvent.idl:
1631         * dom/MutationObserver.idl:
1632         * dom/NamedNodeMap.idl:
1633         * dom/Node.idl:
1634         * dom/NodeFilter.idl:
1635         * dom/NodeIterator.idl:
1636         * dom/NodeList.idl:
1637         * dom/Range.idl:
1638         * dom/RangeException.idl:
1639         * dom/ShadowRoot.idl:
1640         * dom/Text.idl:
1641         * dom/TextEvent.idl:
1642         * dom/TouchEvent.idl:
1643         * dom/TouchList.idl:
1644         * dom/TreeWalker.idl:
1645         * dom/UIEvent.idl:
1646         * dom/WebKitNamedFlow.idl:
1647         * dom/WheelEvent.idl:
1648         * fileapi/Blob.idl:
1649         * fileapi/FileException.idl:
1650         * fileapi/FileList.idl:
1651         * fileapi/FileReader.idl:
1652         * fileapi/FileReaderSync.idl:
1653         * html/DOMFormData.idl:
1654         * html/DOMSettableTokenList.idl:
1655         * html/DOMTokenList.idl:
1656         * html/DOMURL.idl:
1657         * html/HTMLAllCollection.idl:
1658         * html/HTMLAnchorElement.idl:
1659         * html/HTMLButtonElement.idl:
1660         * html/HTMLCanvasElement.idl:
1661         * html/HTMLCollection.idl:
1662         * html/HTMLDocument.idl:
1663         * html/HTMLElement.idl:
1664         * html/HTMLEmbedElement.idl:
1665         * html/HTMLFieldSetElement.idl:
1666         * html/HTMLFormControlsCollection.idl:
1667         * html/HTMLFormElement.idl:
1668         * html/HTMLFrameElement.idl:
1669         * html/HTMLIFrameElement.idl:
1670         * html/HTMLInputElement.idl:
1671         * html/HTMLKeygenElement.idl:
1672         * html/HTMLMarqueeElement.idl:
1673         * html/HTMLMediaElement.idl:
1674         * html/HTMLObjectElement.idl:
1675         * html/HTMLOptionsCollection.idl:
1676         * html/HTMLOutputElement.idl:
1677         * html/HTMLSelectElement.idl:
1678         * html/HTMLTableElement.idl:
1679         * html/HTMLTableRowElement.idl:
1680         * html/HTMLTableSectionElement.idl:
1681         * html/HTMLTextAreaElement.idl:
1682         * html/HTMLVideoElement.idl:
1683         * html/MediaController.idl:
1684         * html/RadioNodeList.idl:
1685         * html/TimeRanges.idl:
1686         * html/canvas/CanvasGradient.idl:
1687         * html/canvas/CanvasRenderingContext2D.idl:
1688         * html/canvas/DOMPath.idl:
1689         * html/canvas/EXTDrawBuffers.idl:
1690         * html/canvas/OESVertexArrayObject.idl:
1691         * html/canvas/WebGLDebugShaders.idl:
1692         * html/canvas/WebGLLoseContext.idl:
1693         * html/canvas/WebGLRenderingContext.idl:
1694         * html/track/AudioTrackList.idl:
1695         * html/track/TextTrack.idl:
1696         * html/track/TextTrackCue.idl:
1697         * html/track/TextTrackCueList.idl:
1698         * html/track/TextTrackList.idl:
1699         * html/track/TextTrackRegionList.idl:
1700         * html/track/VideoTrackList.idl:
1701         * loader/appcache/DOMApplicationCache.idl:
1702         * page/Console.idl:
1703         * page/Crypto.idl:
1704         * page/DOMSecurityPolicy.idl:
1705         * page/DOMSelection.idl:
1706         * page/DOMWindow.idl:
1707         * page/EventSource.idl:
1708         * page/History.idl:
1709         * page/Navigator.idl:
1710         * page/Performance.idl:
1711         * page/PerformanceEntryList.idl:
1712         * page/SpeechInputResultList.idl:
1713         * page/WindowBase64.idl:
1714         * page/WindowTimers.idl:
1715         * plugins/DOMMimeTypeArray.idl:
1716         * plugins/DOMPlugin.idl:
1717         * plugins/DOMPluginArray.idl:
1718         * storage/Storage.idl:
1719         * storage/StorageEvent.idl:
1720         * svg/SVGAngle.idl:
1721         * svg/SVGAnimationElement.idl:
1722         * svg/SVGColor.idl:
1723         * svg/SVGCursorElement.idl:
1724         * svg/SVGDocument.idl:
1725         * svg/SVGElement.idl:
1726         * svg/SVGElementInstanceList.idl:
1727         * svg/SVGException.idl:
1728         * svg/SVGFEDropShadowElement.idl:
1729         * svg/SVGFEGaussianBlurElement.idl:
1730         * svg/SVGFEMorphologyElement.idl:
1731         * svg/SVGFilterElement.idl:
1732         * svg/SVGGraphicsElement.idl:
1733         * svg/SVGLength.idl:
1734         * svg/SVGLengthList.idl:
1735         * svg/SVGMarkerElement.idl:
1736         * svg/SVGMaskElement.idl:
1737         * svg/SVGMatrix.idl:
1738         * svg/SVGNumberList.idl:
1739         * svg/SVGPaint.idl:
1740         * svg/SVGPathElement.idl:
1741         * svg/SVGPathSegList.idl:
1742         * svg/SVGPatternElement.idl:
1743         * svg/SVGPoint.idl:
1744         * svg/SVGPointList.idl:
1745         * svg/SVGSVGElement.idl:
1746         * svg/SVGStringList.idl:
1747         * svg/SVGTests.idl:
1748         * svg/SVGTextContentElement.idl:
1749         * svg/SVGTransform.idl:
1750         * svg/SVGTransformList.idl:
1751         * workers/DedicatedWorkerGlobalScope.idl:
1752         * workers/Worker.idl:
1753         * workers/WorkerGlobalScope.idl:
1754         * workers/WorkerLocation.idl:
1755         * xml/DOMParser.idl:
1756         * xml/XMLHttpRequest.idl:
1757         * xml/XMLHttpRequestException.idl:
1758         * xml/XMLHttpRequestUpload.idl:
1759         * xml/XMLSerializer.idl:
1760         * xml/XPathEvaluator.idl:
1761         * xml/XPathException.idl:
1762         * xml/XPathExpression.idl:
1763         * xml/XPathNSResolver.idl:
1764         * xml/XPathResult.idl:
1765         * xml/XSLTProcessor.idl:
1766
1767 2013-11-11  Javier Fernandez  <jfernandez@igalia.com>
1768
1769         [CSS Regions] Selection focusNode set to the "region" block, instead of the "source" block
1770         https://bugs.webkit.org/show_bug.cgi?id=120769
1771
1772         Reviewed by David Hyatt.
1773
1774         When a point hits a Region block, current positionForPoint algorithm determines its
1775         position in the DOM and returns either the start or end offset for such block, since
1776         Region blocks have no children in the DOM.
1777
1778         It's necessary to map the point into Flow Thread coordinates in order to determine
1779         the DOM position of the specific element rendered by the Region.
1780
1781         Top margin, padding and border points should be mapped to the beginning of the Region
1782         block, while bottom points are mapped to the block end. The Left coordinate its just
1783         adjusted to fit in the Flow Thread boundaries, since its not affected by the Flow
1784         direction.
1785
1786         Besides, when inspecting the Flow Thread blocks looking for the last candidate box,
1787         the Region originally associated to the point might be taken into account. Only the
1788         blocks/boxes rendered by the Region are potential candidates.
1789
1790         Tests: fast/regions/selection/position-for-point-1-vert-lr.html
1791                fast/regions/selection/position-for-point-1-vert-rl.html
1792                fast/regions/selection/position-for-point-1.html
1793                fast/regions/selection/position-for-point-vert-lr.html
1794                fast/regions/selection/position-for-point-vert-rl.html
1795                fast/regions/selection/position-for-point.html
1796
1797         * rendering/RenderBlock.cpp:
1798         (WebCore::isChildHitTestCandidate):
1799         (WebCore::RenderBlock::positionForPoint):
1800         * rendering/RenderBlockFlow.cpp:
1801         (WebCore::RenderBlockFlow::positionForPoint): Added.
1802         It just redirects the call to the associated RenderNamedFlowFragment instance.
1803         * rendering/RenderBlockFlow.h:
1804         * rendering/RenderRegion.cpp:
1805         (WebCore::RenderRegion::mapRegionPointIntoFlowThreadCoordinates): Added.
1806         It performs the coordinates mapping.
1807         (WebCore::RenderRegion::positionForPoint): Added.
1808         It determines the corresponding LayoutPoint in the FlowThread the Region
1809         is associated to, forwarding the call to the RenderBlock class using the
1810         FlowThread's first child block and such new point.
1811         * rendering/RenderRegion.h:
1812
1813 2013-11-11  Gergo Balogh  <geryxyz@inf.u-szeged.hu>
1814
1815         [curl] Remove unused includes.
1816         https://bugs.webkit.org/show_bug.cgi?id=120415
1817
1818         Reviewed by Csaba Osztrogonác.
1819
1820         Original patch by 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
1821
1822         * platform/network/curl/ProxyServerCurl.cpp:
1823         * platform/network/curl/ResourceHandleCurl.cpp:
1824         * platform/network/curl/ResourceHandleManager.cpp:
1825
1826 2013-11-11  Csaba Osztrogonác  <ossy@webkit.org>
1827
1828         URTBF after r159027 to make Apple Windows build happy.
1829
1830         * platform/graphics/cg/ImageSourceCG.cpp:
1831         (WebCore::sharedBufferGetBytesAtPosition):
1832
1833 2013-11-11  Andreas Kling  <akling@apple.com>
1834
1835         Kill InlineFlowBox::rendererLineBoxes().
1836         <https://webkit.org/b/124141>
1837
1838         We only ever used this to access the RenderLineBoxList for non-root
1839         boxes, and those always have a RenderInline renderer.
1840
1841         Tighten things up by losing the virtual rendererLineBoxes() and
1842         calling RenderInline::lineBoxes() directly.
1843
1844         Reviewed by Antti Koivisto.
1845
1846 2013-11-11  Andreas Kling  <akling@apple.com>
1847
1848         Bring the LineFragmentationData back to RootInlineBox.
1849         <https://webkit.org/b/124136>
1850
1851         Now that we have the simple line layout path, almost all the root
1852         line boxes end up with some kind of fragmentation data, so we might
1853         as well put the members back on RootInlineBox and avoid the extra
1854         allocation (and indirection.)
1855
1856         1.74 MB progression on HTML5 spec at <http://whatwg.org/c>
1857
1858         Reviewed by Antti Koivisto.
1859
1860 2013-11-10  Andreas Kling  <akling@apple.com>
1861
1862         Shrink RenderInline.
1863         <https://webkit.org/b/124134>
1864
1865         Move the "always create line boxes" bit from RenderInline up to
1866         RenderElement. I didn't do this earlier because there were no bits
1867         free on RenderObject but thanks to RenderElement we now have tons!
1868
1869         540 kB progression on HTML5 spec at <http://whatwg.org/c>
1870
1871         Reviewed by Anders Carlsson.
1872
1873 2013-11-10  Sam Weinig  <sam@webkit.org>
1874
1875         Make childShouldCreateRenderer() take a Node reference
1876         https://bugs.webkit.org/show_bug.cgi?id=124132
1877
1878         Reviewed by Andreas Kling.
1879
1880         The Node passed to childShouldCreateRenderer() is never null.
1881
1882 2013-11-10  Frédéric Wang  <fred.wang@free.fr>
1883
1884         CSS direction must be reset to ltr on <math> element.
1885         <https://webkit.org/b/124121>
1886
1887         Reviewed by Darin Adler.
1888
1889         Test: mathml/presentation/direction.html
1890
1891         * css/mathml.css:
1892         (math): set direction: ltr; on the <math> element.
1893
1894 2013-11-10  Sam Weinig  <sam@webkit.org>
1895
1896         Reduce the size of RenderBlockFlow by making its rare data inherit from RenderBlockRareData
1897         https://bugs.webkit.org/show_bug.cgi?id=124124
1898
1899         Reviewed by Anders Carlsson.
1900
1901         Reduce RenderBlockFlow by one word.
1902
1903         * rendering/RenderBlock.cpp:
1904         * rendering/RenderBlock.h:
1905         * rendering/RenderBlockFlow.cpp:
1906         * rendering/RenderBlockFlow.h:
1907
1908 2013-11-10  Antti Koivisto  <antti@apple.com>
1909
1910         Use start/end instead of textOffset/textLength for simple text runs
1911         https://bugs.webkit.org/show_bug.cgi?id=124130
1912
1913         Reviewed by Oliver Hunt.
1914         
1915         The code reads better this way.
1916
1917         * rendering/SimpleLineLayout.cpp:
1918         (WebCore::SimpleLineLayout::createTextRuns):
1919         * rendering/SimpleLineLayout.h:
1920         (WebCore::SimpleLineLayout::Run::Run):
1921         * rendering/SimpleLineLayoutFunctions.h:
1922         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
1923         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
1924         (WebCore::SimpleLineLayout::containsTextCaretOffset):
1925         (WebCore::SimpleLineLayout::isTextRendered):
1926         * rendering/SimpleLineLayoutResolver.h:
1927         (WebCore::SimpleLineLayout::RunResolver::Run::text):
1928
1929 2013-11-10  Antti Koivisto  <antti@apple.com>
1930
1931         Implement white-space property on simple line layout path
1932         https://bugs.webkit.org/show_bug.cgi?id=124122
1933
1934         Reviewed by Andreas Kling.
1935         
1936         Support all values of the white-space property and the tab-size property.
1937
1938         Tests: fast/forms/basic-textareas-simple-lines.html
1939                fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html
1940                fast/text/whitespace/pre-wrap-line-test-simple-lines.html
1941                fast/text/whitespace/pre-wrap-long-word-simple-lines.html
1942                fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines.html
1943
1944         * rendering/SimpleLineLayout.cpp:
1945         (WebCore::SimpleLineLayout::canUseFor):
1946         (WebCore::SimpleLineLayout::isWhitespace):
1947         (WebCore::SimpleLineLayout::skipWhitespaces):
1948         (WebCore::SimpleLineLayout::textWidth):
1949         (WebCore::SimpleLineLayout::measureWord):
1950         (WebCore::SimpleLineLayout::createTextRuns):
1951         * rendering/SimpleLineLayoutFunctions.cpp:
1952         (WebCore::SimpleLineLayout::paintDebugBorders):
1953         (WebCore::SimpleLineLayout::paintFlow):
1954
1955 2013-11-10  Sergio Correia  <sergio.correia@openbossa.org>
1956
1957         Fix EFL build after r159027
1958         https://bugs.webkit.org/show_bug.cgi?id=124127
1959
1960         Reviewed by Anders Carlsson.
1961
1962         No new tests, build fix.
1963
1964         * page/Settings.in: Add std to numeric_limits, since we don't have
1965         'using std' directives anymore.
1966
1967 2013-11-10  Anders Carlsson  <andersca@apple.com>
1968
1969         Fix build.
1970
1971         * rendering/RenderMultiColumnBlock.cpp:
1972         (WebCore::RenderMultiColumnBlock::computeColumnCountAndWidth):
1973         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
1974
1975 2013-11-10  Anders Carlsson  <andersca@apple.com>
1976
1977         Remove all 'std' using directives from WebCore
1978         https://bugs.webkit.org/show_bug.cgi?id=124125
1979
1980         Reviewed by Sam Weinig.
1981
1982         As per the coding style guidelines.
1983
1984         * loader/CrossOriginPreflightResultCache.cpp:
1985         (WebCore::CrossOriginPreflightResultCache::appendEntry):
1986         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
1987         * loader/WorkerThreadableLoader.cpp:
1988         * loader/appcache/ApplicationCacheStorage.cpp:
1989         (WebCore::ApplicationCacheStorage::loadCache):
1990         * loader/appcache/ManifestParser.cpp:
1991         (WebCore::parseManifest):
1992         * loader/cache/MemoryCache.cpp:
1993         (WebCore::MemoryCache::deadCapacity):
1994         (WebCore::MemoryCache::lruListFor):
1995         * page/CaptionUserPreferencesMediaAF.cpp:
1996         * page/Chrome.cpp:
1997         * page/DOMTimer.cpp:
1998         (WebCore::DOMTimer::intervalClampedToMinimum):
1999         * page/FocusController.cpp:
2000         * page/Frame.cpp:
2001         (WebCore::Frame::resizePageRectsKeepingRatio):
2002         * page/PageGroupLoadDeferrer.cpp:
2003         * page/Settings.cpp:
2004         * page/animation/AnimationBase.cpp:
2005         (WebCore::solveStepsFunction):
2006         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
2007         (WebCore::AnimationBase::timeToNextService):
2008         (WebCore::AnimationBase::fractionalTime):
2009         (WebCore::AnimationBase::getTimeToNextEvent):
2010         * page/animation/KeyframeAnimation.cpp:
2011         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
2012         * platform/DateComponents.cpp:
2013         * platform/ScrollAnimator.cpp:
2014         (WebCore::ScrollAnimator::handleWheelEvent):
2015         * platform/ScrollView.cpp:
2016         (WebCore::ScrollView::unscaledVisibleContentSize):
2017         (WebCore::ScrollView::setScrollOffset):
2018         (WebCore::ScrollView::updateScrollbars):
2019         (WebCore::ScrollView::scrollContents):
2020         * platform/Scrollbar.cpp:
2021         (WebCore::Scrollbar::moveThumb):
2022         * platform/ScrollbarThemeComposite.cpp:
2023         (WebCore::usedTotalSize):
2024         (WebCore::ScrollbarThemeComposite::thumbPosition):
2025         (WebCore::ScrollbarThemeComposite::thumbLength):
2026         * platform/SharedBuffer.cpp:
2027         (WebCore::SharedBuffer::append):
2028         (WebCore::SharedBuffer::copyBufferAndClear):
2029         (WebCore::SharedBuffer::getSomeData):
2030         * platform/ThreadTimers.cpp:
2031         (WebCore::ThreadTimers::updateSharedTimer):
2032         * platform/Timer.cpp:
2033         (WebCore::TimerHeapLessThanFunction::operator()):
2034         (WebCore::TimerBase::heapPop):
2035         (WebCore::TimerBase::nextUnalignedFireInterval):
2036         * platform/URL.cpp:
2037         (WebCore::findHostnamesInMailToURL):
2038         (WebCore::portAllowed):
2039         * platform/audio/AudioResampler.cpp:
2040         (WebCore::AudioResampler::setRate):
2041         * platform/audio/AudioResamplerKernel.cpp:
2042         (WebCore::AudioResamplerKernel::process):
2043         * platform/audio/Distance.cpp:
2044         (WebCore::DistanceEffect::gain):
2045         * platform/audio/DynamicsCompressorKernel.cpp:
2046         (WebCore::DynamicsCompressorKernel::process):
2047         * platform/audio/EqualPowerPanner.cpp:
2048         (WebCore::EqualPowerPanner::pan):
2049         * platform/audio/HRTFDatabase.cpp:
2050         (WebCore::HRTFDatabase::indexFromElevationAngle):
2051         * platform/audio/HRTFElevation.cpp:
2052         (WebCore::HRTFElevation::createForSubject):
2053         * platform/audio/HRTFKernel.cpp:
2054         (WebCore::HRTFKernel::HRTFKernel):
2055         (WebCore::HRTFKernel::createInterpolatedKernel):
2056         * platform/audio/HRTFPanner.cpp:
2057         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
2058         * platform/audio/Reverb.cpp:
2059         * platform/audio/SincResampler.cpp:
2060         (WebCore::SincResampler::process):
2061         * platform/cf/URLCF.cpp:
2062         * platform/graphics/Color.cpp:
2063         (WebCore::makeRGB):
2064         (WebCore::makeRGBA):
2065         (WebCore::colorFloatToRGBAByte):
2066         (WebCore::Color::light):
2067         (WebCore::Color::dark):
2068         * platform/graphics/CrossfadeGeneratedImage.cpp:
2069         * platform/graphics/FloatQuad.cpp:
2070         (WebCore::min4):
2071         (WebCore::max4):
2072         (WebCore::withinEpsilon):
2073         * platform/graphics/FloatSize.cpp:
2074         (WebCore::FloatSize::isZero):
2075         * platform/graphics/FontFastPath.cpp:
2076         (WebCore::Font::floatWidthForSimpleText):
2077         * platform/graphics/FontPlatformData.cpp:
2078         * platform/graphics/GraphicsContext.cpp:
2079         * platform/graphics/RoundedRect.cpp:
2080         (WebCore::RoundedRect::Radii::expand):
2081         * platform/graphics/ShadowBlur.cpp:
2082         (WebCore::calculateLobes):
2083         (WebCore::computeSliceSizesFromRadii):
2084         * platform/graphics/SimpleFontData.cpp:
2085         (WebCore::SimpleFontData::initCharWidths):
2086         * platform/graphics/WidthIterator.cpp:
2087         (WebCore::WidthIterator::WidthIterator):
2088         (WebCore::WidthIterator::advanceInternal):
2089         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2090         (WebCore::InbandTextTrackPrivateAVF::processCue):
2091         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2092         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2093         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2094         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2095         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
2096         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime):
2097         * platform/graphics/ca/GraphicsLayerCA.cpp:
2098         (WebCore::GraphicsLayerCA::setOpacity):
2099         (WebCore::GraphicsLayerCA::setNeedsDisplay):
2100         (WebCore::GraphicsLayerCA::setupAnimation):
2101         (WebCore::clampedContentsScaleForScale):
2102         * platform/graphics/ca/mac/TileController.mm:
2103         (WebCore::TileController::getTileIndexRangeForRect):
2104         (WebCore::TileController::computeTileCoverageRect):
2105         * platform/graphics/cg/GraphicsContextCG.cpp:
2106         (WebCore::GraphicsContext::setPlatformShadow):
2107         (WebCore::computeLineBoundsAndAntialiasingModeForText):
2108         * platform/graphics/cg/ImageBufferCG.cpp:
2109         * platform/graphics/cg/ImageBufferDataCG.cpp:
2110         (WebCore::ImageBufferData::getData):
2111         * platform/graphics/cg/ImageSourceCG.cpp:
2112         * platform/graphics/filters/FEDropShadow.cpp:
2113         * platform/graphics/filters/FEGaussianBlur.cpp:
2114         (WebCore::boxBlur):
2115         (WebCore::FEGaussianBlur::platformApplyGeneric):
2116         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
2117         (WebCore::FEGaussianBlur::calculateStdDeviation):
2118         * platform/graphics/gpu/Texture.cpp:
2119         (WebCore::Texture::updateSubRect):
2120         * platform/graphics/gpu/TilingData.cpp:
2121         (WebCore::computeNumTiles):
2122         (WebCore::TilingData::tileXIndexFromSrcCoord):
2123         (WebCore::TilingData::tileYIndexFromSrcCoord):
2124         * platform/graphics/mac/ComplexTextController.cpp:
2125         (WebCore::ComplexTextController::ComplexTextController):
2126         (WebCore::ComplexTextController::offsetForPosition):
2127         (WebCore::ComplexTextController::advance):
2128         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2129         * platform/graphics/mac/FontComplexTextMac.cpp:
2130         (WebCore::Font::floatWidthForComplexText):
2131         * platform/graphics/mac/FontMac.mm:
2132         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2133         (WebCore::MediaPlayerPrivateQTKit::duration):
2134         * platform/graphics/mac/SimpleFontDataMac.mm:
2135         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
2136         * platform/graphics/transforms/MatrixTransformOperation.cpp:
2137         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
2138         * platform/graphics/transforms/RotateTransformOperation.cpp:
2139         * platform/graphics/transforms/TransformOperations.cpp:
2140         (WebCore::TransformOperations::blendByMatchingOperations):
2141         * platform/graphics/transforms/TransformationMatrix.cpp:
2142         (WebCore::clampEdgeValue):
2143         * platform/mac/ScrollAnimatorMac.mm:
2144         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
2145         * platform/mac/ScrollViewMac.mm:
2146         (WebCore::ScrollView::platformSetContentsSize):
2147         (WebCore::ScrollView::platformSetScrollPosition):
2148         * platform/mac/ScrollbarThemeMac.mm:
2149         * platform/mac/ThemeMac.mm:
2150         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2151         (-[WebVideoFullscreenHUDWindowController incrementVolume]):
2152         (timeToString):
2153         * platform/network/HTTPHeaderMap.cpp:
2154         (WebCore::HTTPHeaderMap::copyData):
2155         * platform/network/ResourceRequestBase.cpp:
2156         * platform/network/ResourceResponseBase.cpp:
2157         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2158         * platform/network/cf/ResourceResponseCFNet.cpp:
2159         * platform/network/mac/ResourceResponseMac.mm:
2160         (WebCore::ResourceResponse::initNSURLResponse):
2161         * platform/text/TextBreakIteratorICU.cpp:
2162         (WebCore::textClone):
2163         (WebCore::textLatin1MoveInPrimaryContext):
2164         (WebCore::textLatin1MoveInPriorContext):
2165         (WebCore::textInChunkOrOutOfRange):
2166         (WebCore::textOpenLatin1):
2167         (WebCore::textUTF16MoveInPrimaryContext):
2168         (WebCore::textUTF16MoveInPriorContext):
2169         (WebCore::textOpenUTF16):
2170         * platform/text/TextCodecUTF16.cpp:
2171         (WebCore::TextCodecUTF16::encode):
2172         * platform/text/TextCodecUTF8.cpp:
2173         (WebCore::TextCodecUTF8::encode):
2174         * platform/text/TextStream.cpp:
2175         * platform/text/mac/LocaleMac.mm:
2176         * platform/text/mac/TextCodecMac.cpp:
2177         (WebCore::TextCodecMac::decode):
2178         * rendering/AutoTableLayout.cpp:
2179         (WebCore::AutoTableLayout::recalcColumn):
2180         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
2181         (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
2182         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
2183         (WebCore::AutoTableLayout::layout):
2184         * rendering/FixedTableLayout.cpp:
2185         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
2186         * rendering/FloatingObjects.cpp:
2187         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
2188         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
2189         (WebCore::FloatingObjects::logicalRightOffset):
2190         * rendering/InlineBox.cpp:
2191         * rendering/InlineFlowBox.cpp:
2192         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
2193         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
2194         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2195         (WebCore::InlineFlowBox::computeMaxLogicalTop):
2196         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
2197         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
2198         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
2199         (WebCore::InlineFlowBox::nodeAtPoint):
2200         (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
2201         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
2202         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
2203         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder):
2204         * rendering/InlineTextBox.cpp:
2205         (WebCore::InlineTextBox::isSelected):
2206         (WebCore::InlineTextBox::localSelectionRect):
2207         (WebCore::InlineTextBox::placeEllipsisBox):
2208         (WebCore::InlineTextBox::applyShadowToGraphicsContext):
2209         (WebCore::InlineTextBox::paint):
2210         (WebCore::InlineTextBox::selectionStartEnd):
2211         (WebCore::InlineTextBox::paintSelection):
2212         (WebCore::InlineTextBox::paintCompositionBackground):
2213         (WebCore::computeUnderlineOffset):
2214         (WebCore::InlineTextBox::paintDecoration):
2215         (WebCore::InlineTextBox::paintDocumentMarker):
2216         (WebCore::InlineTextBox::paintTextMatchMarker):
2217         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2218         (WebCore::InlineTextBox::paintCompositionUnderline):
2219         * rendering/RenderBlock.cpp:
2220         (WebCore::RenderBlock::computeOverflow):
2221         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
2222         (WebCore::RenderBlock::paintChild):
2223         (WebCore::RenderBlock::blockSelectionGap):
2224         (WebCore::RenderBlock::logicalLeftSelectionGap):
2225         (WebCore::RenderBlock::logicalRightSelectionGap):
2226         (WebCore::RenderBlock::calcColumnWidth):
2227         (WebCore::RenderBlock::adjustRectForColumns):
2228         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
2229         (WebCore::RenderBlock::computePreferredLogicalWidths):
2230         (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
2231         (WebCore::updatePreferredWidth):
2232         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2233         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2234         * rendering/RenderBlockFlow.cpp:
2235         (WebCore::RenderBlockFlow::clearFloats):
2236         (WebCore::RenderBlockFlow::layoutBlock):
2237         (WebCore::RenderBlockFlow::layoutBlockChild):
2238         (WebCore::RenderBlockFlow::collapseMargins):
2239         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
2240         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
2241         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
2242         (WebCore::RenderBlockFlow::setCollapsedBottomMargin):
2243         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
2244         (WebCore::calculateMinimumPageHeight):
2245         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
2246         (WebCore::RenderBlockFlow::removeFloatingObject):
2247         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
2248         (WebCore::RenderBlockFlow::positionNewFloats):
2249         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
2250         (WebCore::RenderBlockFlow::addOverhangingFloats):
2251         (WebCore::RenderBlockFlow::getClearDelta):
2252         (WebCore::RenderBlockFlow::adjustForBorderFit):
2253         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
2254         (WebCore::RenderBlockFlow::updateLogicalHeight):
2255         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
2256         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
2257         (WebCore::RenderBlockFlow::relayoutForPagination):
2258         * rendering/RenderBlockLineLayout.cpp:
2259         (WebCore::updateLogicalWidthForLeftAlignedBlock):
2260         (WebCore::updateLogicalWidthForRightAlignedBlock):
2261         (WebCore::updateLogicalWidthForCenterAlignedBlock):
2262         (WebCore::setLogicalWidthForTextRun):
2263         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
2264         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
2265         (WebCore::RenderBlockFlow::layoutLineBoxes):
2266         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
2267         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
2268         (WebCore::tryHyphenating):
2269         * rendering/RenderBox.cpp:
2270         (WebCore::RenderBox::scrollWidth):
2271         (WebCore::RenderBox::scrollHeight):
2272         (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
2273         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
2274         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
2275         (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
2276         (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
2277         (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
2278         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
2279         (WebCore::RenderBox::repaintLayerRectsForImage):
2280         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2281         (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
2282         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
2283         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
2284         (WebCore::RenderBox::computeLogicalWidthInRegion):
2285         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
2286         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2287         (WebCore::RenderBox::computeInlineDirectionMargins):
2288         (WebCore::RenderBox::computeLogicalHeight):
2289         (WebCore::RenderBox::computePercentageLogicalHeight):
2290         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
2291         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
2292         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2293         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2294         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2295         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2296         (WebCore::RenderBox::applyVisualEffectOverflow):
2297         (WebCore::RenderBox::addLayoutOverflow):
2298         * rendering/RenderBoxModelObject.cpp:
2299         (WebCore::RenderBoxModelObject::calculateFillTileSize):
2300         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
2301         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
2302         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
2303         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2304         (WebCore::RenderBoxModelObject::paintOneBorderSide):
2305         (WebCore::calculateAdjustedInnerBorder):
2306         (WebCore::RenderBoxModelObject::paintBoxShadow):
2307         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
2308         * rendering/RenderDeprecatedFlexibleBox.cpp:
2309         (WebCore::FlexBoxIterator::next):
2310         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
2311         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
2312         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2313         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2314         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2315         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
2316         * rendering/RenderFileUploadControl.cpp:
2317         (WebCore::RenderFileUploadControl::maxFilenameWidth):
2318         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
2319         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2320         * rendering/RenderImage.cpp:
2321         (WebCore::RenderImage::setImageSizeForAltText):
2322         * rendering/RenderInline.cpp:
2323         (WebCore::computeMargin):
2324         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
2325         (WebCore::RenderInline::paintOutline):
2326         (WebCore::RenderInline::paintOutlineForLine):
2327         * rendering/RenderLayer.cpp:
2328         (WebCore::RenderLayer::clampScrollOffset):
2329         (WebCore::RenderLayer::scrollRectToVisible):
2330         (WebCore::RenderLayer::visibleContentRect):
2331         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
2332         (WebCore::RenderLayer::hitTestOverflowControls):
2333         (WebCore::RenderLayer::hitTestLayer):
2334         (WebCore::RenderLayer::calculateLayerBounds):
2335         * rendering/RenderLayerBacking.cpp:
2336         * rendering/RenderLayerModelObject.cpp:
2337         * rendering/RenderLineBoxList.cpp:
2338         (WebCore::RenderLineBoxList::rangeIntersectsRect):
2339         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
2340         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
2341         (WebCore::RenderLineBoxList::paint):
2342         * rendering/RenderListBox.cpp:
2343         (WebCore::RenderListBox::updateFromElement):
2344         (WebCore::RenderListBox::layout):
2345         (WebCore::RenderListBox::computePreferredLogicalWidths):
2346         (WebCore::RenderListBox::size):
2347         (WebCore::RenderListBox::numVisibleItems):
2348         (WebCore::RenderListBox::panScroll):
2349         (WebCore::RenderListBox::scrollHeight):
2350         * rendering/RenderListItem.cpp:
2351         * rendering/RenderListMarker.cpp:
2352         * rendering/RenderMarquee.cpp:
2353         (WebCore::RenderMarquee::marqueeSpeed):
2354         (WebCore::RenderMarquee::computePosition):
2355         (WebCore::RenderMarquee::timerFired):
2356         * rendering/RenderMediaControls.cpp:
2357         * rendering/RenderMenuList.cpp:
2358         (WebCore::RenderMenuList::updateOptionsWidth):
2359         (WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
2360         (WebCore::RenderMenuList::computePreferredLogicalWidths):
2361         * rendering/RenderMeter.cpp:
2362         * rendering/RenderMultiColumnBlock.cpp:
2363         * rendering/RenderMultiColumnSet.cpp:
2364         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
2365         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
2366         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
2367         * rendering/RenderNamedFlowFragment.cpp:
2368         * rendering/RenderObject.cpp:
2369         (WebCore::RenderObject::drawLineForBoxSide):
2370         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
2371         (WebCore::RenderObject::caretMaxOffset):
2372         * rendering/RenderProgress.cpp:
2373         * rendering/RenderRegion.cpp:
2374         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
2375         * rendering/RenderReplaced.cpp:
2376         (WebCore::RenderReplaced::shouldPaint):
2377         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2378         (WebCore::RenderReplaced::computePreferredLogicalWidths):
2379         * rendering/RenderRubyBase.cpp:
2380         * rendering/RenderRubyRun.cpp:
2381         (WebCore::RenderRubyRun::getOverhang):
2382         * rendering/RenderRubyText.cpp:
2383         (WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
2384         * rendering/RenderScrollbarPart.cpp:
2385         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
2386         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
2387         * rendering/RenderSearchField.cpp:
2388         (WebCore::RenderSearchField::computeControlLogicalHeight):
2389         * rendering/RenderTable.cpp:
2390         (WebCore::RenderTable::updateLogicalWidth):
2391         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2392         (WebCore::RenderTable::layout):
2393         (WebCore::RenderTable::computePreferredLogicalWidths):
2394         (WebCore::RenderTable::calcBorderStart):
2395         (WebCore::RenderTable::calcBorderEnd):
2396         (WebCore::RenderTable::outerBorderBefore):
2397         (WebCore::RenderTable::outerBorderAfter):
2398         (WebCore::RenderTable::outerBorderStart):
2399         (WebCore::RenderTable::outerBorderEnd):
2400         * rendering/RenderTableCell.cpp:
2401         (WebCore::RenderTableCell::parseColSpanFromDOM):
2402         (WebCore::RenderTableCell::parseRowSpanFromDOM):
2403         (WebCore::RenderTableCell::logicalWidthFromColumns):
2404         (WebCore::RenderTableCell::computePreferredLogicalWidths):
2405         (WebCore::RenderTableCell::layout):
2406         (WebCore::RenderTableCell::setOverrideLogicalContentHeightFromRowHeight):
2407         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
2408         (WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
2409         (WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
2410         * rendering/RenderTableSection.cpp:
2411         (WebCore::RenderTableSection::ensureRows):
2412         (WebCore::RenderTableSection::calcRowLogicalHeight):
2413         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
2414         (WebCore::RenderTableSection::layoutRows):
2415         (WebCore::RenderTableSection::firstLineBaseline):
2416         (WebCore::RenderTableSection::removeCachedCollapsedBorders):
2417         (WebCore::RenderTableSection::setCachedCollapsedBorder):
2418         (WebCore::RenderTableSection::cachedCollapsedBorder):
2419         * rendering/RenderText.cpp:
2420         (WebCore::makeCapitalized):
2421         (WebCore::RenderText::absoluteRectsForRange):
2422         (WebCore::RenderText::absoluteQuadsForRange):
2423         (WebCore::maxWordFragmentWidth):
2424         (WebCore::RenderText::computePreferredLogicalWidths):
2425         * rendering/RenderTextControl.cpp:
2426         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2427         * rendering/RenderTextControlSingleLine.cpp:
2428         * rendering/RenderThemeMac.mm:
2429         (WebCore::RenderThemeMac::paintProgressBar):
2430         (WebCore::RenderThemeMac::paintMenuListButton):
2431         * rendering/RenderWidget.cpp:
2432         * rendering/RootInlineBox.cpp:
2433         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
2434         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
2435         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
2436         (WebCore::RootInlineBox::blockDirectionPointInLine):
2437         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
2438         (WebCore::setAscentAndDescent):
2439         (WebCore::RootInlineBox::ascentAndDescentForBox):
2440         * rendering/mathml/RenderMathMLRoot.cpp:
2441         (WebCore::RenderMathMLRoot::layout):
2442         * rendering/style/RenderStyle.cpp:
2443         (WebCore::calcConstraintScaleFor):
2444         (WebCore::RenderStyle::setFontSize):
2445         (WebCore::RenderStyle::getShadowExtent):
2446         (WebCore::RenderStyle::getShadowInsetExtent):
2447         (WebCore::RenderStyle::getShadowHorizontalExtent):
2448         (WebCore::RenderStyle::getShadowVerticalExtent):
2449         * rendering/style/SVGRenderStyle.cpp:
2450         * rendering/style/ShadowData.cpp:
2451         (WebCore::calculateShadowExtent):
2452         * rendering/svg/RenderSVGResourceFilter.cpp:
2453         * rendering/svg/RenderSVGRoot.cpp:
2454         * rendering/svg/SVGInlineFlowBox.cpp:
2455         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2456         * rendering/svg/SVGInlineTextBox.cpp:
2457         (WebCore::SVGInlineTextBox::localSelectionRect):
2458         * svg/SVGAnimatedNumber.cpp:
2459         * svg/SVGAnimatedNumberOptionalNumber.cpp:
2460         * svg/animation/SMILTimeContainer.cpp:
2461         (WebCore::SMILTimeContainer::startTimer):
2462         (WebCore::SMILTimeContainer::updateAnimations):
2463         * svg/animation/SVGSMILElement.cpp:
2464         (WebCore::SVGSMILElement::simpleDuration):
2465         (WebCore::SVGSMILElement::repeatingDuration):
2466         (WebCore::SVGSMILElement::resolveActiveEnd):
2467         (WebCore::SVGSMILElement::resolveInterval):
2468         (WebCore::SVGSMILElement::resolveFirstInterval):
2469         (WebCore::SVGSMILElement::resolveNextInterval):
2470         (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
2471         * xml/XMLTreeViewer.cpp:
2472         * xml/parser/XMLDocumentParser.cpp:
2473         * xml/parser/XMLDocumentParserLibxml2.cpp:
2474         (WebCore::OffsetBuffer::readOutBytes):
2475
2476 2013-11-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2477
2478         [AX] Clean up static_cast<> to cast from AccessibilityObject 
2479         https://bugs.webkit.org/show_bug.cgi?id=124032
2480
2481         Reviewed by Mario Sanchez Prada.
2482
2483         ACCESSIBILITY_OBJECT_TYPE_CASTS can support more helpful casting functions.
2484         So, we need to use them as much as possible. This patch cleans up all static_cast<> in accessibility.
2485
2486         This patch generates toAccessibilityFoo() in order to replace static_cast<> with it. Below toAccessibilityFoo()
2487         are generated.
2488
2489         - toAccessibilityARIAGridRow()
2490         - toAccessibilityImageMapLink()
2491         - toAccessibilityListBox()
2492         - toAccessibilityListBoxOption()
2493         - toAccessibilityMenuListOption()
2494         - toAccessibilityMenuListPopup()
2495         - toAccessibilityScrollbar()
2496         - toAccessibilitySlider()
2497
2498         No new tests, no behavior changes.
2499
2500         * accessibility/AXObjectCache.cpp:
2501         (WebCore::AXObjectCache::focusedImageMapUIElement):
2502         * accessibility/AccessibilityARIAGridRow.h:
2503         * accessibility/AccessibilityImageMapLink.h:
2504         * accessibility/AccessibilityListBox.cpp:
2505         (WebCore::AccessibilityListBox::setSelectedChildren):
2506         (WebCore::AccessibilityListBox::selectedChildren):
2507         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
2508         * accessibility/AccessibilityListBox.h:
2509         * accessibility/AccessibilityListBoxOption.h:
2510         * accessibility/AccessibilityMenuList.cpp:
2511         (WebCore::AccessibilityMenuList::addChildren):
2512         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
2513         * accessibility/AccessibilityMenuListOption.h:
2514         * accessibility/AccessibilityMenuListPopup.cpp:
2515         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
2516         * accessibility/AccessibilityMenuListPopup.h:
2517         * accessibility/AccessibilityObject.h:
2518         (WebCore::AccessibilityObject::isListBoxOption):
2519         (WebCore::AccessibilityObject::isSliderThumb):
2520         * accessibility/AccessibilityRenderObject.cpp:
2521         (WebCore::AccessibilityRenderObject::getDocumentLinks):
2522         (WebCore::AccessibilityRenderObject::addImageMapChildren):
2523         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
2524         * accessibility/AccessibilityScrollView.cpp:
2525         (WebCore::AccessibilityScrollView::addChildScrollbar):
2526         * accessibility/AccessibilityScrollbar.h:
2527         * accessibility/AccessibilitySlider.cpp:
2528         (WebCore::AccessibilitySlider::addChildren):
2529         * accessibility/AccessibilitySlider.h:
2530         * accessibility/AccessibilitySpinButton.cpp:
2531         (WebCore::AccessibilitySpinButton::addChildren):
2532         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
2533         (webkitAccessibleSelectionClearSelection):
2534         (webkitAccessibleSelectionSelectAllSelection):
2535         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2536         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2537         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2538         * rendering/RenderMenuList.cpp:
2539         (WebCore::RenderMenuList::didUpdateActiveOption):
2540
2541 2013-11-10  Andreas Kling  <akling@apple.com>
2542
2543         Rebaseline bindings tests after r158997.
2544
2545         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2546
2547 2013-11-10  Brendan Long  <b.long@cablelabs.com>
2548
2549         [GStreamer] Consolidate more code into TrackPrivateBaseGStreamer
2550         https://bugs.webkit.org/show_bug.cgi?id=124020
2551
2552         Reviewed by Philippe Normand.
2553
2554         No new tests because this is just refactoring.
2555
2556         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
2557         (WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer): Don't pass playbin to TrackPrivateBaseGStreamer, and do pass a pointer to "this".
2558         (WebCore::AudioTrackPrivateGStreamer::disconnect): Clear m_playbin().
2559         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Move labelChanged() and languageChanged() to TrackPrivateBaseGStreamer. Move m_playbin to this class (along with disconnect() to clear it).
2560         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Move tag handling, pad and index to TrackPrivateBaseGStreamer.
2561         (WebCore::textTrackPrivateEventCallback):
2562         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
2563         (WebCore::InbandTextTrackPrivateGStreamer::disconnect):
2564         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2565         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Add WebKitTextCombinerPad with "tags" property, set in the same was as input-selector's pads.
2566         (webkit_text_combiner_pad_init): Initialize tags to 0.
2567         (webkitTextCombinerPadFinalize): Clear tags.
2568         (webkitTextCombinerPadGetProperty): Handling "tags" property.
2569         (webkitTextCombinerPadEvent): Changed to be a pad event function instead of a pad probe, and now intercepts tags and merges them (like input-selector pads do).
2570         (webkitTextCombinerRequestNewPad): Using WebKitTextCombinerPad instead of just GhostPad.
2571         (webkit_text_combiner_pad_class_init): Setup WebKitTextCombinerPad.
2572         * platform/graphics/gstreamer/TextCombinerGStreamer.h: Remove superfluous code.
2573         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2574         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Use "notify::active" so we don't need a playbin, and immediately check for tags after the constructor.
2575         (WebCore::TrackPrivateBaseGStreamer::disconnect): Remove m_playbin.
2576         (WebCore::TrackPrivateBaseGStreamer::getTag): Refactored out from notifyTrackOfTagsChanged.
2577         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Simplify using m_owner (so we can call labelChanged() and languageChanged() directly), and use getTag() above.
2578         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_owner to we can access the owning track, and change some functions to match our needs better.
2579         (WebCore::TrackPrivateBaseGStreamer::setActive): Add empty default since InbandTextTrackPrivateGStreamer doesn't need this.
2580         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Same as AudioTrackPrivateGStreamer.
2581         (WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
2582         (WebCore::VideoTrackPrivateGStreamer::disconnect):
2583         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same as AudioTrackPrivateGStreamer.
2584
2585 2013-11-10  Andreas Kling  <akling@apple.com>
2586
2587         Generate type casting helpers for Widget classes.
2588         <https://webkit.org/b/124120>
2589
2590         Add a WIDGET_TYPE_CASTS macro and replace all the hand-written
2591         toFoo() helpers we had for Widget subclasses. Fixed up a handful
2592         of places that were still using static_cast.
2593
2594         Reviewed by Antti Koivisto.
2595
2596 2013-11-10  Andreas Kling  <akling@apple.com>
2597
2598         Remove unused FragmentationDisabler class.
2599         <https://webkit.org/b/124118>
2600
2601         This RAII object was added in r144744 to avoid a crash when using
2602         MathML inside CSS regions. Its only user was removed in r157070.
2603
2604         Reviewed by Antti Koivisto.
2605
2606 2013-11-10  Andreas Kling  <akling@apple.com>
2607
2608         Simplify some is-this-a-MathML-element? checks.
2609         <https://webkit.org/b/124119>
2610
2611         As of r158198, the MathML-ness of an Element is determined by
2612         a Node flag, so there's no need to cast to Element before checking
2613         on this. Simplify accordingly.
2614
2615         Reviewed by Antti Koivisto.
2616
2617 2013-11-10  Andreas Kling  <akling@apple.com>
2618
2619         Remove RenderTheme::shouldOpenPickerWithF4Key().
2620
2621         Rubber-stamped by Anders Carlsson.
2622
2623 2013-11-09  Andreas Kling  <akling@apple.com>
2624
2625         CSSValuePool::createFontFamilyValue() should return PassRef.
2626         <https://webkit.org/b/124114>
2627
2628         Unlike createFontFaceValue(), createFontFamilyValue() can never
2629         fail to return an object and thus should return PassRef.
2630
2631         Reviewed by Anders Carlsson.
2632
2633 2013-11-09  Andreas Kling  <akling@apple.com>
2634
2635         RenderIFrame should display its name correctly in DRT output.
2636         <https://webkit.org/b/124117>
2637
2638         Nuke an age-old FIXME about making RenderIFrame show its true name
2639         in DRT output. No more "RenderPartObject {IFRAME}"!
2640
2641         Reviewed by Anders Carlsson.
2642
2643 2013-11-09  Andreas Kling  <akling@apple.com>
2644
2645         SVGTextMetricsBuilder::walkTree() should take a RenderElement.
2646         <https://webkit.org/b/124105>
2647
2648         Make walkTree() take a RenderElement so we can use the non-virtual
2649         firstChild() internally. All call sites had pointers to compatible
2650         objects already.
2651
2652         Reviewed by Anders Carlsson.
2653
2654 2013-11-09  Andreas Kling  <akling@apple.com>
2655
2656         RenderMathMLFenced should pass around operators in tighter types.
2657         <https://webkit.org/b/124115>
2658
2659         Store operator renderers in RenderMathMLOperator pointers instead
2660         of passing them around as RenderObject.
2661
2662         Reviewed by Martin Robinson.
2663
2664 2013-11-09  Andreas Kling  <akling@apple.com>
2665
2666         Use RENDER_OBJECT_TYPE_CASTS for more types.
2667         <https://webkit.org/b/124112>
2668
2669         Generate toRenderFoo() type casting helpers for these classes:
2670
2671             - RenderCombineText
2672             - RenderDetailsMarker
2673             - RenderListMarker
2674             - RenderVideo
2675             - RenderView
2676
2677         Reviewed by Anders Carlsson.
2678
2679 2013-11-09  Andreas Kling  <akling@apple.com>
2680
2681         Move MathML type checking virtuals to RenderObject.
2682         <https://webkit.org/b/124111>
2683
2684         Previously, checking the type of a MathML renderer would require
2685         that you first check if it's a RenderMathMLBlock, and then casting
2686         to that type to access the check you really wanted.
2687
2688         This change moves all the isRenderMathMLFoo() virtual functions
2689         to RenderObject. I also made sure all the overloads were private
2690         and marked them OVERRIDE/FINAL as appropriate.
2691
2692         Finally I replaced all the hand-written casting functions with
2693         autogenerated ones using RENDER_OBJECT_TYPE_CASTS.
2694
2695         Reviewed by Anders Carlsson.
2696
2697 2013-11-09  Martin Robinson  <mrobinson@igalia.com>
2698
2699         [MathML] Poor spacing around delimiters in MathML Torture Test 14
2700         https://bugs.webkit.org/show_bug.cgi?id=122837
2701
2702         Reviewed by Brent Fulgham.
2703
2704         Instead of stretching the vertical bar with the stretchable version, just repeat
2705         the normal vertical bar. This follows what Gecko does when rendering tall vertical
2706         bars and also works around an issue with STIX fonts leading to poor spacing in
2707         formulas.
2708
2709         * rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
2710         normal variant.
2711
2712 2013-11-09  Anders Carlsson  <andersca@apple.com>
2713
2714         Encode form data using the KeyedEncoder
2715         https://bugs.webkit.org/show_bug.cgi?id=124107
2716
2717         Reviewed by Sam Weinig.
2718
2719         * platform/KeyedCoding.h:
2720         (WebCore::KeyedEncoder::encodeEnum):
2721         * platform/network/FormData.cpp:
2722         (WebCore::encodeElement):
2723         (WebCore::FormData::encode):
2724         * platform/network/FormData.h:
2725
2726 2013-11-09  Sam Weinig  <sam@webkit.org>
2727
2728         Modernize CanvasObserverProxy
2729         https://bugs.webkit.org/show_bug.cgi?id=124106
2730
2731         Reviewed by Anders Carlsson.
2732
2733         * css/CSSCanvasValue.h:
2734
2735 2013-11-09  Patrick Gansterer  <paroga@webkit.org>
2736
2737         Move RunLoop from WebCore to WTF
2738         https://bugs.webkit.org/show_bug.cgi?id=116606
2739
2740         Reviewed by Anders Carlsson.
2741
2742         * CMakeLists.txt:
2743         * GNUmakefile.list.am:
2744         * PlatformBlackBerry.cmake:
2745         * PlatformEfl.cmake:
2746         * PlatformGTK.cmake:
2747         * PlatformWin.cmake:
2748         * WebCore.exp.in:
2749         * WebCore.vcxproj/WebCore.vcxproj:
2750         * WebCore.xcodeproj/project.pbxproj:
2751         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2752         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2753
2754 2013-11-09  Andreas Kling  <akling@apple.com>
2755
2756         Tighten typing in SVGResourcesCycleSolver a bit.
2757         <https://webkit.org/b/124104>
2758
2759         Make the SVGResourcesCycleSolver constructor take a RenderElement&
2760         and a SVGResources&.
2761
2762         While I was in the neighborhood, also converted one loop to use a
2763         renderer iterator instead of walking siblings manually.
2764
2765         Finally used "auto" to clean up some overly wordy loops.
2766
2767         Reviewed by Anders Carlsson.
2768
2769 2013-11-09  Andreas Kling  <akling@apple.com>
2770
2771         Beat SVGRenderSupport with the RenderElement stick.
2772         <https://webkit.org/b/124102>
2773
2774         Tighten up all the SVGRenderSupport helper functions by making them
2775         take const RenderElements references instead of raw RenderObject
2776         pointers as much as possible.
2777
2778         This tunes up a bunch of branchy style() calls.
2779
2780         The patch looks big but it's mostly mechanical. I just changed the
2781         signatures and then worked backwards until everything built again.
2782
2783         Reviewed by Antti Koivisto.
2784
2785 2013-11-09  Andreas Kling  <akling@apple.com>
2786
2787         SVGTextLayoutAttributes always has a RenderSVGInlineText.
2788         <https://webkit.org/b/124101>
2789
2790         No SVGTextLayoutAttributes object is without a RenderSVGInlineText
2791         "context" so make context() return a reference.
2792
2793         Reviewed by Antti Koivisto.
2794
2795 2013-11-09  Andreas Kling  <akling@apple.com>
2796
2797         Move BindingSecurity stuff under JSDOMBinding umbrella.
2798         <https://webkit.org/b/124099>
2799
2800         We are hitting shouldAllowAccessToDOMWindow() pretty hard on the
2801         demo here: <http://www.jasondavies.com/maps/rotate/>
2802
2803         Putting it together with the rest of the JSDOMBinding code takes
2804         CPU time spent in there from 8.7% to 6.5%. The abstraction was
2805         only used to support alternate JS engines in the past.
2806
2807         Reviewed by Antti Koivisto.
2808
2809 2013-11-08  Brady Eidson  <beidson@apple.com>
2810
2811         Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
2812         https://bugs.webkit.org/show_bug.cgi?id=124088
2813
2814         Reviewed by Tim Horton.
2815 +
2816         * CMakeLists.txt:
2817         * GNUmakefile.list.am:
2818         * WebCore.vcxproj/WebCore.vcxproj:
2819         * WebCore.xcodeproj/project.pbxproj:
2820
2821         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Removed.
2822
2823         * Modules/indexeddb/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
2824         * Modules/indexeddb/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
2825
2826         * Modules/indexeddb/IDBBackingStoreInterface.h:
2827         * Modules/indexeddb/IDBCallbacks.h:
2828         * Modules/indexeddb/IDBCursor.cpp:
2829         * Modules/indexeddb/IDBCursorBackend.cpp:
2830         * Modules/indexeddb/IDBCursorBackend.h:
2831         * Modules/indexeddb/IDBDatabase.cpp:
2832         * Modules/indexeddb/IDBDatabase.h:
2833         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2834         * Modules/indexeddb/IDBIndex.cpp:
2835         * Modules/indexeddb/IDBIndex.h:
2836         * Modules/indexeddb/IDBIndexWriter.h:
2837         * Modules/indexeddb/IDBObjectStore.cpp:
2838         * Modules/indexeddb/IDBObjectStore.h:
2839         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2840         * Modules/indexeddb/IDBOpenDBRequest.h:
2841         * Modules/indexeddb/IDBPendingDeleteCall.h:
2842         * Modules/indexeddb/IDBRequest.cpp:
2843         * Modules/indexeddb/IDBRequest.h:
2844         * Modules/indexeddb/IDBTransaction.cpp:
2845         * Modules/indexeddb/IDBTransaction.h:
2846         * Modules/indexeddb/IDBTransactionBackend.cpp:
2847         * Modules/indexeddb/IDBTransactionBackend.h:
2848         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2849         * Modules/indexeddb/IDBTransactionBackendOperations.h:
2850         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2851         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2852         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
2853         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
2854
2855 2013-11-08  Andreas Kling  <akling@apple.com>
2856
2857         Reindent JSDOMBinding.h (finally.)
2858
2859         Rubber-stamped by Sam Weinig.
2860
2861 2013-11-08  Sam Weinig  <sam@webkit.org>
2862
2863         Change collectStyleForPresentationAttribute and related functions to take a MutableStylePropertySet by reference
2864         https://bugs.webkit.org/show_bug.cgi?id=124096
2865
2866         Reviewed by Andreas Kling.
2867
2868         Pass MutableStylePropertySet by reference. It is never null.
2869
2870 2013-11-08  Anders Carlsson  <andersca@apple.com>
2871
2872         Implement encoding of arrays of objects
2873         https://bugs.webkit.org/show_bug.cgi?id=124091
2874
2875         Reviewed by Beth Dakin.
2876
2877         * history/HistoryItem.cpp:
2878         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2879         Encode the rest of the members.
2880
2881         * platform/KeyedCoding.h:
2882         (WebCore::KeyedEncoder::encodeObjects):
2883         Call beginArray, then beginArrayElement/endArrayElement for every element and lastly endArray.
2884
2885 2013-11-08  Tim Horton  <timothy_horton@apple.com>
2886
2887         Remote Layer Tree: RemoteLayerBackingStore partial repaint is broken for the tile cache
2888         https://bugs.webkit.org/show_bug.cgi?id=123944
2889
2890         Reviewed by Simon Fraser.
2891
2892         Ensure that the tile cache retrieves repaint rects from the tile layer,
2893         not from the tiled backing layer.
2894
2895         * platform/graphics/ca/PlatformCALayer.h:
2896         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2897         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2898         (PlatformCALayerMac::enumerateRectsBeingDrawn):
2899         Allow the PlatformCALayer to decide how to enumerate rects to paint.
2900
2901         * WebCore.exp.in:
2902         * platform/graphics/mac/WebLayer.h:
2903         Add RepaintRectList, remove some unnecessary WebCore::s.
2904
2905         * platform/graphics/mac/WebLayer.mm:
2906         (WebCore::collectRectsToPaint):
2907         Factor collectRectsToPaint out; it just grabs the rects from
2908         the layer and makes the decision whether to repaint the bounds
2909         of the dirty region or just the subregions.
2910
2911         Move calls to collectRectsToPaint() to callers of drawLayerContents(),
2912         so that TileController can collect rects from the appropriate source
2913         (the Tile layer) and other layers just continue grabbing them from
2914         their relevant layers.
2915
2916         Make sure that the list that comes from collectRectsToPaint() always
2917         has at least one rect in it (appending the clip bounds if we don't
2918         want to repaint subregions) so we can simplify logic in drawLayerContents.
2919
2920         (WebCore::drawLayerContents):
2921         Remove code to support CompositingCoordinatesBottomUp, as it's only
2922         used on Windows, so this Mac-specific code doesn't need to support it.
2923
2924         Simplify logic given that dirtyRects will always be non-empty.
2925
2926         (-[WebLayer drawInContext:]):
2927         (-[WebSimpleLayer setNeedsDisplayInRect:]):
2928         * platform/graphics/ca/mac/TileController.mm:
2929         (WebCore::TileController::platformCALayerPaintContents):
2930         Adopt collectRectsToPaint.
2931
2932 2013-11-08  Anders Carlsson  <andersca@apple.com>
2933
2934         Implement more KeyedEncoder functionality
2935         https://bugs.webkit.org/show_bug.cgi?id=124089
2936
2937         Reviewed by Beth Dakin.
2938
2939         * bindings/js/SerializedScriptValue.h:
2940         * history/HistoryItem.cpp:
2941         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2942         * platform/KeyedCoding.h:
2943         (WebCore::KeyedEncoder::encodeConditionalObject):
2944
2945 2013-11-08  Eric Carlson  <eric.carlson@apple.com>
2946
2947         getCueAsHTML() on an empty cue should return a document fragment
2948         https://bugs.webkit.org/show_bug.cgi?id=124084
2949
2950         Reviewed by Darin Adler.
2951
2952         Test: media/track/track-cue-empty-cue-text.html
2953
2954         * html/track/WebVTTParser.cpp:
2955         (WebCore::WebVTTParser::createDocumentFragmentFromCueText): Don't return early when the
2956             passed an empty string.
2957
2958 2013-11-08  Anders Carlsson  <andersca@apple.com>
2959
2960         KeyedEncoder should be able to encoder objects
2961         https://bugs.webkit.org/show_bug.cgi?id=124085
2962
2963         Reviewed by Sam Weinig.
2964
2965         * history/HistoryItem.cpp:
2966         (WebCore::HistoryItem::encodeBackForwardTree):
2967         Encode the root object.
2968
2969         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2970         Encode the target.
2971
2972         * history/HistoryItem.h:
2973         Add new members.
2974
2975         * platform/KeyedCoding.h:
2976         (WebCore::KeyedEncoder::encodeObject):
2977         Call beginObject, call the functor and then call endObject().
2978
2979 2013-11-08  Sam Weinig  <sam@webkit.org>
2980
2981         Teach CanvasObserver about references
2982         https://bugs.webkit.org/show_bug.cgi?id=124082
2983
2984         Reviewed by Anders Carlsson.
2985
2986         * css/CSSCanvasValue.cpp:
2987         * css/CSSCanvasValue.h:
2988         * html/HTMLCanvasElement.cpp:
2989         * html/HTMLCanvasElement.h:
2990
2991 2013-11-08  Anders Carlsson  <andersca@apple.com>
2992
2993         Begin stubbing out a KeyedEncoder class in WebCore
2994         https://bugs.webkit.org/show_bug.cgi?id=124079
2995
2996         Reviewed by Sam Weinig.
2997
2998         * WebCore.exp.in:
2999         Add symbol needed by WebCore.
3000
3001         * WebCore.xcodeproj/project.pbxproj:
3002         Add new header file.
3003
3004         * history/HistoryItem.cpp:
3005         (WebCore::HistoryItem::encodeBackForwardTree):
3006         * history/HistoryItem.h:
3007         Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.
3008
3009         * platform/KeyedCoding.h:
3010         Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.
3011
3012 2013-11-08  Brady Eidson  <beidson@apple.com>
3013
3014         Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
3015         https://bugs.webkit.org/show_bug.cgi?id=124077
3016
3017         Reviewed by Alexey Proskuryakov.
3018
3019         The abstraction is no longer needed.
3020
3021         * CMakeLists.txt:
3022         * GNUmakefile.list.am:
3023         * WebCore.xcodeproj/project.pbxproj:
3024
3025         * Modules/indexeddb/IDBTransactionBackendInterface.h: Removed.
3026
3027         * Modules/indexeddb/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
3028         * Modules/indexeddb/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
3029
3030         * Modules/indexeddb/IDBBackingStoreInterface.h:
3031         * Modules/indexeddb/IDBCursorBackend.cpp:
3032         * Modules/indexeddb/IDBCursorBackend.h:
3033         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3034         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3035         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3036         * Modules/indexeddb/IDBTransactionBackendOperations.h:
3037         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
3038         * Modules/indexeddb/IDBTransactionCoordinator.h:
3039         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3040         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3041         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3042         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3043
3044 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
3045
3046         REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
3047         https://bugs.webkit.org/show_bug.cgi?id=124075
3048
3049         Reviewed by Beth Dakin.
3050         
3051         In r155660 I removed some scrollbar-related layouts when scrollbars
3052         are in overlay mode.
3053         
3054         However, ScrollView::updateScrollbars() has a case where we still need
3055         to do multiple pases, related to its "Never ever try to both gain/lose a
3056         scrollbar in the same pass" comment. When we avoid making a new scrollbar
3057         because the other was removed, we need to do another pass to bring the
3058         correct scrollbar back.
3059
3060         Can't test overlay scrollbars in tests.
3061
3062         * platform/ScrollView.cpp:
3063         (WebCore::ScrollView::updateScrollbars):
3064
3065 2013-11-08  Hans Muller  <hmuller@adobe.com>
3066
3067         [CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped
3068         https://bugs.webkit.org/show_bug.cgi?id=123769
3069
3070         Reviewed by Dirk Schulze.
3071
3072         Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class
3073         and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals()
3074         method now generates intervals with Y coordinates that begin at the image shape's
3075         bounds.y - shape-margin, which may be less than 0.
3076
3077         The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter
3078         by the shape-margin. A non-const overload of the method was added to centralize all
3079         access to m_intervalLists.
3080
3081         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004.html
3082               fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005.html
3083
3084         * rendering/shapes/RasterShape.cpp:
3085         (WebCore::MarginIntervalGenerator::intervalAt): Don't clip X coordinates to 0 since they can extend into the margin-box.
3086         (WebCore::RasterShapeIntervals::appendInterval): Use the non-const intervalsAt() method.
3087         (WebCore::RasterShapeIntervals::uniteMarginInterval): Ditto.
3088         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals): See above.
3089         * rendering/shapes/RasterShape.h:
3090         (WebCore::RasterShapeIntervals::RasterShapeIntervals): Added a field for the margin.
3091         (WebCore::RasterShapeIntervals::intervalsAt): Offset y coordinates by the margin; added a non-const overload.
3092
3093 2013-11-08  Piotr Grad  <p.grad@samsung.com>
3094
3095         Ended event should work also when playback rate is negative
3096         https://bugs.webkit.org/show_bug.cgi?id=123879
3097
3098         Reviewed by Eric Carlson.
3099
3100         According to W3C specification playback is ended also when playback rate is
3101         negative and position is the earliest possible position.
3102
3103         Test: media/video-ended-event-negative-playback.html
3104
3105         * html/HTMLMediaElement.cpp:
3106         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
3107
3108 2013-11-08  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3109
3110         Checking for TypeError in RTCPeerConnection object creation
3111         https://bugs.webkit.org/show_bug.cgi?id=124049
3112
3113         Reviewed by Eric Carlson.
3114
3115         If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
3116         According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.
3117
3118         Please notice that this patch does not make every tests run as expected,
3119         RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
3120
3121         Existing tests were updated.
3122
3123         * GNUmakefile.list.am:
3124         * Modules/mediastream/RTCPeerConnection.idl:
3125         * UseJSC.cmake:
3126         * WebCore.vcxproj/WebCore.vcxproj:
3127         * WebCore.vcxproj/WebCore.vcxproj.filters:
3128         * WebCore.xcodeproj/project.pbxproj:
3129         * bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
3130         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
3131
3132 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
3133
3134         Use references instead of pointers to RenderBlockFlow in FloatingObjects and ComputeFloatOffsetAdapter
3135         https://bugs.webkit.org/show_bug.cgi?id=124074
3136
3137         Reviewed by Sam Weinig.
3138
3139         Just a straightforward conversion from const pointers to const references.
3140
3141         Also, remove unneeded argument from FloatingObjects constructor.
3142
3143         No new tests, no behavior change.
3144
3145         * rendering/FloatingObjects.cpp:
3146         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
3147         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
3148         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
3149         (WebCore::FloatingObjects::FloatingObjects):
3150         (WebCore::FloatingObjects::clearLineBoxTreePointers):
3151         (WebCore::FloatingObjects::computePlacedFloatsTree):
3152         (WebCore::shapeInfoForFloat):
3153         (WebCore::::updateOffsetIfNeeded):
3154         (WebCore::::collectIfNeeded):
3155         (WebCore::::heightRemaining):
3156         * rendering/FloatingObjects.h:
3157         * rendering/RenderBlockFlow.cpp:
3158         (WebCore::RenderBlockFlow::createFloatingObjects):
3159
3160 2013-11-08  Sam Weinig  <sam@webkit.org>
3161
3162         Teach SubframeLoader a bit about references
3163         https://bugs.webkit.org/show_bug.cgi?id=124076
3164
3165         Reviewed by Anders Carlsson.
3166
3167         * html/HTMLAppletElement.cpp:
3168         * html/HTMLFrameElementBase.cpp:
3169         * html/HTMLMediaElement.cpp:
3170         * loader/SubframeLoader.cpp:
3171         * loader/SubframeLoader.h:
3172
3173 2013-11-08  Brady Eidson  <beidson@apple.com>
3174
3175         Blind Windows build-fix attempt after r158959
3176
3177         * WebCore.vcxproj/WebCore.vcxproj:
3178
3179 2013-11-08  Brady Eidson  <beidson@apple.com>
3180
3181         Merge IDBCursorBackendInterface and IDBCursorBackendImpl
3182         https://bugs.webkit.org/show_bug.cgi?id=124068
3183
3184         Reviewed by Anders Carlsson.
3185
3186         * CMakeLists.txt:
3187         * GNUmakefile.list.am:
3188         * WebCore.xcodeproj/project.pbxproj:
3189
3190         * Modules/indexeddb/IDBCursorBackendInterface.h: Removed.
3191
3192         * Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
3193         * Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
3194
3195         * Modules/indexeddb/IDBCallbacks.h:
3196         * Modules/indexeddb/IDBCursor.cpp:
3197         * Modules/indexeddb/IDBCursor.h:
3198         * Modules/indexeddb/IDBCursorWithValue.cpp:
3199         * Modules/indexeddb/IDBCursorWithValue.h:
3200         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3201         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3202         * Modules/indexeddb/IDBRequest.cpp:
3203         * Modules/indexeddb/IDBRequest.h:
3204         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3205         * Modules/indexeddb/IDBTransactionBackendImpl.h:
3206         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3207         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
3208         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3209         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3210
3211 2013-11-08  Sam Weinig  <sam@webkit.org>
3212
3213         Modernize FrameLoader a bit
3214         https://bugs.webkit.org/show_bug.cgi?id=124073
3215
3216         Reviewed by Anders Carlsson.
3217
3218         * loader/FrameLoader.cpp:
3219         * loader/FrameLoader.h:
3220         Use std::unique_ptrs rather than OwnPtrs.
3221
3222         * loader/MixedContentChecker.cpp:
3223         * loader/MixedContentChecker.h:
3224         Switch to hold a Frame& rather than Frame*.
3225
3226 2013-11-08  Zan Dobersek  <zdobersek@igalia.com>
3227
3228         Remove code guarded with ENABLE(STREAM)
3229         https://bugs.webkit.org/show_bug.cgi?id=123667
3230
3231         Reviewed by Anders Carlsson.
3232
3233         Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
3234         no port enables the feature and the work on this feature has wound down after the Chromium port forked,
3235         leaving this code unmaintained.
3236
3237         * fileapi/FileReaderLoader.cpp:
3238         * fileapi/FileReaderLoader.h:
3239
3240 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
3241
3242         RenderBlockFlow::nextFloatLogicalBottomBelow should not use ShapeOutsideFloatOffsetMode
3243         https://bugs.webkit.org/show_bug.cgi?id=123931
3244
3245         Reviewed by Sam Weinig.
3246
3247         Rewrite nextFloatLogicalBottomBelow to use the placed floats tree for
3248         the search and to not need ShapeOutsideFloatOffsetMode anymore. This
3249         moves almost all of the logic into FloatingObjects, making a small
3250         reduction in the amount that RenderBlockFlow needs to know about the
3251         implementation of FloatingObjects.
3252
3253         In addition, change ComputeFloatOffsetAdapter to take in LayoutUnits
3254         and roundToInt itself so that all of it's callers can be simplified.
3255
3256         No new tests, no new behavior.
3257
3258         * rendering/FloatingObjects.cpp:
3259         (WebCore::rangesIntersect):
3260         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
3261         (WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
3262         (WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
3263         (WebCore::FindNextFloatLogicalBottomAdapter::highValue):
3264         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
3265         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
3266         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
3267         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
3268         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
3269         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
3270         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
3271         (WebCore::FloatingObjects::logicalLeftOffset):
3272         (WebCore::FloatingObjects::logicalRightOffset):
3273         * rendering/FloatingObjects.h:
3274         * rendering/LineWidth.cpp:
3275         (WebCore::LineWidth::fitBelowFloats):
3276         * rendering/RenderBlockFlow.cpp:
3277         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
3278         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock):
3279         (WebCore::RenderBlockFlow::getClearDelta):
3280         * rendering/RenderBlockFlow.h:
3281
3282 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
3283
3284         https://bugs.webkit.org/show_bug.cgi?id=124064
3285         Some WebCrypto files are not in correct directories
3286
3287         Rubber-stamped by Anders Carlsson.
3288
3289         * WebCore.xcodeproj/project.pbxproj:
3290         * crypto/CryptoAlgorithmAesCbcParams.h: Removed.
3291         * crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
3292         * crypto/CryptoKeyAES.cpp: Removed.
3293         * crypto/CryptoKeyAES.h: Removed.
3294         * crypto/CryptoKeyMac.cpp: Removed.
3295         * crypto/keys/CryptoKeyAES.cpp: Copied from Source/WebCore/crypto/CryptoKeyAES.cpp.
3296         * crypto/keys/CryptoKeyAES.h: Copied from Source/WebCore/crypto/CryptoKeyAES.h.
3297         * crypto/mac/CryptoKeyMac.cpp: Copied from Source/WebCore/crypto/CryptoKeyMac.cpp.
3298         * crypto/parameters/CryptoAlgorithmAesCbcParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesCbcParams.h.
3299         * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h.
3300
3301 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
3302
3303         Implement JWK key import for HMAC and AES-CBC
3304         https://bugs.webkit.org/show_bug.cgi?id=124059
3305
3306         Reviewed by Anders Carlsson.
3307
3308         Tests: crypto/subtle/aes-cbc-import-jwk.html
3309                crypto/subtle/hmac-import-jwk.html
3310                crypto/subtle/import-jwk.html
3311
3312         WebCrypto supports multiple key formats - raw, pkcs8, spki, jwk. The design is that
3313         we'll transform these into parsed KeyData subclasses before passing to algorithms.
3314
3315         CryptoKeySerialization is a base class for handling all these formats.
3316
3317         * WebCore.xcodeproj/project.pbxproj: Added new files. Removed CryptoKeyFormat.h.
3318         
3319         * bindings/js/JSCryptoKeySerializationJWK.h: Added.
3320         * bindings/js/JSCryptoKeySerializationJWK.cpp: Added.
3321         (WebCore::getStringFromJSON): A helper. Note that we can rely on the object being
3322         a nice freshly parsed JSON, no getters or anything.
3323         (WebCore::getBooleanFromJSON): Ditto.
3324         (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
3325         (WebCore::JSCryptoKeySerializationJWK::~JSCryptoKeySerializationJWK):
3326         (WebCore::createHMACParameters): A simple helper.
3327         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): WebCrypto API is weird,
3328         you can have algorithm parameters both inside a JWK key and passed as importKey()
3329         arguments. They need to agree, whatever that means for specific serialization's
3330         algorithm options (not all necessarily have a 1-1 matching to WebCrypto).
3331         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Take an intersection of usages.
3332         (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Only extractable if
3333         both JWK and the caller agree.
3334         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Verify validity of JWK key.
3335         (WebCore::JSCryptoKeySerializationJWK::keyData): Return an appropriate KeyData
3336         subclass.
3337
3338         * bindings/js/JSSubtleCryptoCustom.cpp:
3339         (WebCore::ENUM_CLASS): Moved CryptoKeyFormat here.
3340         (WebCore::cryptoKeyFormatFromJSValue): Added a human readable string to an exception.
3341         (WebCore::JSSubtleCrypto::importKey): Support multiple key formats, not just raw.
3342
3343         * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::importKey):
3344         * crypto/CryptoAlgorithm.h:
3345         Updated signature for importKey to one that makes more sense. Decoding formats all
3346         the way from a binary blob is not something that CryptoAlgorithm subclasses should
3347         do, we now pass a KeyData subclass instead.
3348         Removed exportKey/wrapKey/unwrapKey altogether, because I don't yet know what the
3349         signatures will be.
3350
3351         * crypto/CryptoKeyData.h: Added.
3352         (WebCore::CryptoKeyData::ENUM_CLASS):
3353         (WebCore::CryptoKeyData::CryptoKeyData):
3354         (WebCore::CryptoKeyData::~CryptoKeyData):
3355         (WebCore::CryptoKeyData::format):
3356         A base class for passing key material to algorithms. Currently, only one type is
3357         supported, that being OctetSequence for secret keys. Keys for RSA and EC are more
3358         complicated, and secret/public ones are different too.
3359
3360         * crypto/CryptoKeyFormat.h: Removed. There are too many key format classes
3361         confusingly floating around, and this was only needed in one file for parsing.
3362
3363         * crypto/CryptoKeySerialization.h: Added.
3364         Base class for handling raw/pkcs8/spki/jwk keys.
3365
3366         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
3367         (WebCore::CryptoAlgorithmAES_CBC::importKey):
3368         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
3369         Updated to use CryptoKeyData.
3370
3371         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
3372         (WebCore::CryptoAlgorithmHMAC::importKey):
3373         * crypto/algorithms/CryptoAlgorithmHMAC.h:
3374         Updated to use CryptoKeyData.
3375
3376         * crypto/keys/CryptoKeyDataOctetSequence.cpp: Added.
3377         (WebCore::CryptoKeyDataOctetSequence::CryptoKeyDataOctetSequence):
3378         (WebCore::CryptoKeyDataOctetSequence::~CryptoKeyDataOctetSequence):
3379         * crypto/keys/CryptoKeyDataOctetSequence.h: Added.
3380         (WebCore::asCryptoKeyDataOctetSequence):
3381         * crypto/keys/CryptoKeySerializationRaw.cpp: Added.
3382         (WebCore::CryptoKeySerializationRaw::CryptoKeySerializationRaw):
3383         (WebCore::CryptoKeySerializationRaw::~CryptoKeySerializationRaw):
3384         (WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
3385         (WebCore::CryptoKeySerializationRaw::reconcileUsages):
3386         (WebCore::CryptoKeySerializationRaw::reconcileExtractable):
3387         (WebCore::CryptoKeySerializationRaw::keyData):
3388         * crypto/keys/CryptoKeySerializationRaw.h: Added.
3389         Much code to pass around a Vector<char>.
3390
3391 2013-11-08  Mark Lam  <mark.lam@apple.com>
3392
3393         Move breakpoint (and exception break) functionality into JSC::Debugger.
3394         https://bugs.webkit.org/show_bug.cgi?id=121796.
3395
3396         Reviewed by Geoffrey Garen.
3397
3398         No new tests.
3399
3400         - In ScriptDebugServer and JSC::Debugger, SourceID and BreakpointID are
3401           now numeric tokens.
3402
3403         - JSC::Debugger now tracks user defined breakpoints in a JSC::Breakpoint
3404           record. Previously, this info is tracked in the ScriptBreakpoint record
3405           in ScriptDebugServer. The only element of ScriptBreakpoint that is not
3406           being tracked by JSC::Breakpoint is the ScriptBreakpointAction.
3407              The ScriptBreakpointAction is still tracked by the ScriptDebugServer
3408           in a list keyed on the corresponding BreakpointID.
3409              The ScriptBreakpoint record is now only used as a means of passing
3410           breakpoint paramaters to the ScriptDebugServer.
3411
3412         - ScriptDebugServer now no longer accesses the JSC::CallFrame* directly.
3413           It always goes through the DebuggerCallFrame.
3414
3415         * GNUmakefile.list.am:
3416         * WebCore.vcxproj/WebCore.vcxproj:
3417         * WebCore.vcxproj/WebCore.vcxproj.filters:
3418         * WebCore.xcodeproj/project.pbxproj:
3419         * bindings/js/BreakpointID.h: Added.
3420         * bindings/js/ScriptDebugServer.cpp:
3421         (WebCore::ScriptDebugServer::ScriptDebugServer):
3422         (WebCore::ScriptDebugServer::setBreakpoint):
3423         (WebCore::ScriptDebugServer::removeBreakpoint):
3424         (WebCore::ScriptDebugServer::clearBreakpoints):
3425         (WebCore::ScriptDebugServer::dispatchDidPause):
3426         (WebCore::ScriptDebugServer::dispatchDidContinue):
3427         (WebCore::ScriptDebugServer::dispatchDidParseSource):
3428         (WebCore::ScriptDebugServer::notifyDoneProcessingDebuggerEvents):
3429         (WebCore::ScriptDebugServer::needPauseHandling):
3430         (WebCore::ScriptDebugServer::handleBreakpointHit):
3431         (WebCore::ScriptDebugServer::handleExceptionInBreakpointCondition):
3432         (WebCore::ScriptDebugServer::handlePause):
3433         * bindings/js/ScriptDebugServer.h:
3434         * bindings/js/SourceID.h: Added.
3435         * bindings/js/WorkerScriptDebugServer.cpp:
3436         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
3437         * bindings/js/WorkerScriptDebugServer.h:
3438         * inspector/InspectorDebuggerAgent.cpp:
3439         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
3440         (WebCore::parseLocation):
3441         (WebCore::InspectorDebuggerAgent::setBreakpoint):
3442         (WebCore::InspectorDebuggerAgent::continueToLocation):
3443         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
3444         (WebCore::InspectorDebuggerAgent::searchInContent):
3445         (WebCore::InspectorDebuggerAgent::getScriptSource):
3446         (WebCore::InspectorDebuggerAgent::didParseSource):
3447         (WebCore::InspectorDebuggerAgent::didPause):
3448         (WebCore::InspectorDebuggerAgent::clear):
3449         * inspector/InspectorDebuggerAgent.h:
3450         * inspector/ScriptDebugListener.h: