871e1184a82b66355e39389a94b142c28ad05881
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-21  Mark Rowe  <mrowe@apple.com>
2
3         <https://webkit.org/b/124702> Stop overriding VALID_ARCHS.
4
5         All modern versions of Xcode set it appropriately for our needs.
6
7         Reviewed by Alexey Proskuryakov.
8
9         * Configurations/Base.xcconfig:
10
11 2013-11-21  Gwang Yoon Hwang  <ryumiel@company100.net>
12
13         [GTK] Unreviewed buildfix after r159614 and r159656.
14
15         * bindings/gobject/WebKitDOMCustom.cpp: Add missing header
16
17 2013-11-21  Laszlo Vidacs  <lac@inf.u-szeged.hu>
18
19         Fix WinCairo unreachable code warnings in SimpleLineLayout.cpp
20         https://bugs.webkit.org/show_bug.cgi?id=124704
21
22         Reviewed by Antti Koivisto.
23
24         Fix unreachable code warnings using conditional directives.
25
26         * rendering/SimpleLineLayout.cpp:
27         (WebCore::SimpleLineLayout::canUseFor):
28
29 2013-11-21  Mark Rowe  <mrowe@apple.com>
30
31         <https://webkit.org/b/124701> Fix an error in a few Xcode configuration setting files.
32
33         Reviewed by Alexey Proskuryakov.
34
35         * Configurations/Base.xcconfig:
36
37 2013-11-21  Mark Rowe  <mrowe@apple.com>
38
39         <https://webkit.org/b/124700> Fix some deprecation warnings.
40
41         Reviewed by Anders Carlsson.
42
43         * platform/mac/HTMLConverter.mm:
44         (fileWrapperForURL): Move off a deprecated NSFileWrapper method.
45
46 2013-11-21  Daniel Bates  <dabates@apple.com>
47
48         [iOS] Build fix; export symbol for WebCore::provideDeviceOrientationTo()
49
50         Add the symbol __ZN7WebCore26provideDeviceOrientationToEPNS_4PageEPNS_23DeviceOrientationClientE.
51
52         * WebCore.exp.in:
53
54 2013-11-21  Daniel Bates  <dabates@apple.com>
55
56         Add !USE(NETWORK_CFDATA_ARRAY_CALLBACK)-guard
57         https://bugs.webkit.org/show_bug.cgi?id=124741
58
59         Reviewed by Alexey Proskuryakov.
60
61         Add !USE(NETWORK_CFDATA_ARRAY_CALLBACK)-guard around code that is unused
62         when building with feature NETWORK_CFDATA_ARRAY_CALLBACK.
63
64         Additionally, add a declaration for allocateSegment() with attribute WARN_UNUSED_RETURN
65         to have the compiler warn when the return value of this function is unused. Together with
66         warnings treated as errors this change will prevent a memory leak.
67
68         * platform/SharedBuffer.cpp:
69
70 2013-11-21  Daniel Bates  <dabates@apple.com>
71
72         Remove unused functions from WebCore and WebKit2
73         https://bugs.webkit.org/show_bug.cgi?id=124739
74
75         Reviewed by Alexey Proskuryakov.
76
77         * editing/markup.cpp: Remove unused functions isHTMLBlockElement and
78         ancestorToRetainStructureAndAppearanceWithNoRenderer.
79         * rendering/InlineElementBox.cpp: Append newline to the end of the file.
80
81 2013-11-21  Daniel Bates  <dabates@apple.com>
82
83         Only generate isObservable() when IDL specifies GenerateIsReachable
84         https://bugs.webkit.org/show_bug.cgi?id=124729
85
86         Reviewed by Geoffrey Garen.
87
88         We should only generate the static inline function isObservable() when the IDL
89         specifies GenerateIsReachable. Otherwise, this function is unused.
90
91         Added a new test IDL TestGenerateIsReachable.idl and expected results to test that
92         we generate isObservable() when an IDL specifies GenerateIsReachable. Additionally,
93         rebased existing test results.
94
95         * bindings/scripts/CodeGeneratorJS.pm:
96         (GenerateImplementation):
97         * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.cpp: Added.
98         * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.h: Added.
99         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp: Added.
100         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h: Added.
101         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachablePrivate.h: Added.
102         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Removed unused function isObservable().
103         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
104         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
105         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
106         * bindings/scripts/test/JS/JSTestException.cpp: Ditto.
107         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added.
108         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added.
109         * bindings/scripts/test/JS/JSTestInterface.cpp: Removed unused function isObservable().
110         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
111         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
112         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
113         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
114         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
115         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
116         * bindings/scripts/test/JS/JSattribute.cpp: Ditto.
117         * bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
118         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h: Added.
119         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: Added.
120         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h: Added.
121         * bindings/scripts/test/TestGenerateIsReachable.idl: Added.
122
123 2013-11-21  Beth Dakin  <bdakin@apple.com>
124
125         Add a new mode to extend the tile cache beyond the page
126         https://bugs.webkit.org/show_bug.cgi?id=124216
127
128         Reviewed by Simon Fraser.
129
130         This patch makes it possible to give the tile cache a margin of tiles. If there is 
131         a margin of tiles, this patch paints those tiles with the background color. Note 
132         that this patch does not actually give the tile cache a margin at this time.
133
134         You opt into a margined tiled cache by called setTileMargins() with number of 
135         pixels that the margin on that side should be. 
136         * platform/graphics/TiledBacking.h:
137         * platform/graphics/ca/mac/TileController.h:
138         * platform/graphics/ca/mac/TileController.mm:
139         (WebCore::TileController::TileController):
140         (WebCore::TileController::tilesWouldChangeForVisibleRect):
141
142         TileController::bounds() now computes the bounds INCLUDING the margin.
143         (WebCore::TileController::bounds):
144
145         adjustRectAtTileIndexForMargin() is a new function that is required to get the 
146         rect size for tiles in the margin right. rectForTileIndex() assumes all tiles 
147         strive to be the size of m_tileSize, but now margin tiles will be whatever the 
148         margin sizes were set to.
149         (WebCore::TileController::adjustRectAtTileIndexForMargin):
150         (WebCore::TileController::rectForTileIndex):
151
152         This is another instance where m_tileSize is not always the right size to use.
153         (WebCore::TileController::getTileIndexRangeForRect):
154
155         The tile coverage rect now might include the margin tiles. Only include them in 
156         slow-scrolling mode if the current position is within one tile of the edge.
157         (WebCore::TileController::computeTileCoverageRect):
158
159         tileSizeForCoverageRect() does not make sense in a world where the coverage rect 
160         will include margin. Instead, this patch implements the current strategy more 
161         explicitly by returning the visibleRect in the slow scrolling case, and in the 
162         process this patch also re-names tileSizeForCoverageRect() to computeTileSize() 
163         since it no longer takes a coverageRect.
164         (WebCore::TileController::computeTileSize):
165         (WebCore::TileController::revalidateTiles):
166
167         New setters and getters for the tile margins on each side.
168         (WebCore::TileController::setTileMargins):
169         (WebCore::TileController::hasMargins):
170         (WebCore::TileController::topMarginHeight):
171         (WebCore::TileController::bottomMarginHeight):
172         (WebCore::TileController::leftMarginWidth):
173         (WebCore::TileController::rightMarginWidth):
174
175         New function to add margin onto the composited bounds if there is one.
176         * rendering/RenderLayerBacking.cpp:
177         (WebCore::RenderLayerBacking::tiledBackingHasMargin):
178         (WebCore::RenderLayerBacking::paintContents):
179         (WebCore::RenderLayerBacking::compositedBoundsIncludingMargin):
180         * rendering/RenderLayerBacking.h:
181
182         Do not set masks to bounds if there is a margin on the root layer.
183         * rendering/RenderLayerCompositor.cpp:
184         (WebCore::RenderLayerCompositor::updateBacking):
185         (WebCore::RenderLayerCompositor::mainFrameBackingIsTiledWithMargin):
186         * rendering/RenderLayerCompositor.h:
187
188         Allow background color to paint into the margin tiles.
189         * rendering/RenderView.cpp:
190         (WebCore::RenderView::paintBoxDecorations):
191
192 2013-11-21  Alexey Proskuryakov  <ap@apple.com>
193
194         Implement WebCrypto wrapKey
195         https://bugs.webkit.org/show_bug.cgi?id=124738
196
197         Reviewed by Anders Carlsson.
198
199         Tests: crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html
200                crypto/subtle/aes-cbc-wrap-rsa.html
201
202         * bindings/js/JSSubtleCryptoCustom.cpp:
203         (WebCore::exportKey): Factored out the actual operation that can be chained with
204         encryption for wrapKey.
205         (WebCore::JSSubtleCrypto::exportKey):
206         (WebCore::JSSubtleCrypto::wrapKey):
207         (WebCore::JSSubtleCrypto::unwrapKey): Fixed a memory leak in failure code path.
208
209         * crypto/SubtleCrypto.idl: Added wrapKey.
210
211 2013-11-21  Alexey Proskuryakov  <ap@apple.com>
212
213         Implement WebCrypto unwrapKey
214         https://bugs.webkit.org/show_bug.cgi?id=124725
215
216         Reviewed by Anders Carlsson.
217
218         Tests: crypto/subtle/aes-cbc-unwrap-failure.html
219                crypto/subtle/aes-cbc-unwrap-rsa.html
220
221         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
222         * bindings/js/JSCryptoAlgorithmDictionary.h:
223         Removed calls for wrap/unwrap parameter parsing, these are just the same as encrypt/decrypt.
224
225         * bindings/js/JSCryptoOperationData.cpp:
226         (WebCore::cryptoOperationDataFromJSValue):
227         * bindings/js/JSCryptoOperationData.h:
228         * crypto/CryptoKeySerialization.h:
229         More Vector<char> elimination.
230
231         * bindings/js/JSDOMPromise.cpp:
232         * bindings/js/JSDOMPromise.h:
233         Removed unneccessary copy constructor and assignment operator, they are no diffdrent
234         than compiler generated ones.
235
236         * bindings/js/JSSubtleCryptoCustom.cpp:
237         (WebCore::cryptoKeyUsagesFromJSValue): Minor style fixes.
238         (WebCore::JSSubtleCrypto::encrypt): Ditto.
239         (WebCore::JSSubtleCrypto::decrypt): Ditto.
240         (WebCore::JSSubtleCrypto::sign): Ditto.
241         (WebCore::JSSubtleCrypto::verify): Ditto.
242         (WebCore::JSSubtleCrypto::generateKey): Ditto.
243         (WebCore::importKey): Separated actual import operation and the parts that read
244         arguments from ExecState, and call the promise. Logically, this should be outside
245         of bindings code even, but JWK makes that quite challenging.
246         (WebCore::JSSubtleCrypto::importKey): This only does the more mundane arguments
247         and return parts now.
248         (WebCore::JSSubtleCrypto::exportKey): Minor style fixes.
249         (WebCore::JSSubtleCrypto::unwrapKey): Chain decrypt and import.
250
251         * crypto/CryptoAlgorithm.cpp:
252         (WebCore::CryptoAlgorithm::encryptForWrapKey):
253         (WebCore::CryptoAlgorithm::decryptForUnwrapKey):
254         * crypto/CryptoAlgorithm.h:
255         There are algorithms that expose wrap/unwrap, but not encrypt/decrypt. These will
256         override these new functions, and leave encrypt/decrypt to raise NOT_SUPPORTED_ERR.
257
258         * crypto/SubtleCrypto.idl: Added unwrapKey.
259
260 2013-11-21  Robert Sipka  <sipka@inf.u-szeged.hu>
261
262         [curl]Improve ssl certificate storage and check
263         https://bugs.webkit.org/show_bug.cgi?id=124569
264
265         Reviewed by Brent Fulgham.
266
267         Storage and check the whole certificate chain, not just the root certificate.
268
269         * platform/network/curl/SSLHandle.cpp:
270         (WebCore::allowsAnyHTTPSCertificateHosts):
271         (WebCore::sslIgnoreHTTPSCertificate):
272         (WebCore::pemData):
273         (WebCore::certVerifyCallback):
274
275 2013-11-21  Mihai Maerean  <mmaerean@adobe.com>
276
277         Fix hover area for divs with css transforms
278         https://bugs.webkit.org/show_bug.cgi?id=124647
279
280         Reviewed by Allan Sandfeld Jensen.
281
282         Non transformed layers are now being hit last, not through or in-between transformed layers.
283         The paint order says that the divs creating stacking contexts (including transforms) are painted after the
284         other siblings so they should be hit tested in the reverse order. Also, a rotated div in a non-rotated parent
285         should be hit in its entire area, not hit its parent's background, even if the z-coordinate is negative where
286         the mouse is located.
287
288         Test: transforms/3d/hit-testing/hover-rotated-negative-z.html
289
290         * rendering/RenderLayer.cpp:
291         (WebCore::computeZOffset):
292
293 2013-11-21  Andres Gomez  <agomez@igalia.com>
294
295         [GTK] Release compilation fails when defining "LOG_DISABLED=0"
296         https://bugs.webkit.org/show_bug.cgi?id=124661
297
298         Reviewed by Mario Sanchez Prada.
299
300         In a "Debug" build the CString.h header comes from another
301         indirect dependency. Now, we explicitly add this missing include.
302
303         * html/HTMLTrackElement.cpp: Explicitly adding missing include.
304
305 2013-11-21  Ryosuke Niwa  <rniwa@webkit.org>
306
307         Fix Range.insertNode when the inserted node is in the same container as the Range
308         https://bugs.webkit.org/show_bug.cgi?id=123957
309
310         Reviewed by Antti Koivisto.
311
312         Inspired by https://chromium.googlesource.com/chromium/blink/+/fb6ca1f488703e8d4f20ce6449cc8ea210be6edb
313
314         When a node from the same container is inserted, we can't simply adjust m_end with the offset.
315         Compute m_start and m_end from the inserted nodes instead.
316
317         Also, don't adjust m_start and m_end to nodes outside of the document if the inserted nodes had been
318         removed by mutation events.
319
320         Test: fast/dom/Range/range-insertNode-same-container.html
321
322         * dom/Range.cpp:
323         (WebCore::Range::insertNode):
324
325 2013-11-21  Ryosuke Niwa  <rniwa@webkit.org>
326
327         nextBoundary and previousBoundary are very slow when there is a password field
328         https://bugs.webkit.org/show_bug.cgi?id=123973
329
330         Reviewed by Antti Koivisto.
331
332         Merge https://chromium.googlesource.com/chromium/blink/+/57366eec5e3edea54062d4e74c0e047f8681dbad
333
334         When iterating through DOM nodes nextBoundary and previousBoundary convert the contents of nodes using
335         text security to a sequence of 'x' characters. The SimplifiedBackwardsTextIterator and TextIterator
336         may iterate past node boundaries. Before this patch, the transformation was done looking at the starting
337         node rather than the current node. In some situations, this replaced all boundaries with 'x' and caused
338         the text iterator to continue iterating and transforming until the extent of the document.
339
340         Test: editing/deleting/password-delete-performance.html
341
342         * editing/TextIterator.h:
343         (WebCore::SimplifiedBackwardsTextIterator::node):
344         * editing/VisibleUnits.cpp:
345         (WebCore::previousBoundary):
346         (WebCore::nextBoundary):
347
348 2013-11-21  Ryosuke Niwa  <rniwa@webkit.org>
349
350         HTML parser should not associate elements inside templates with forms
351         https://bugs.webkit.org/show_bug.cgi?id=117779
352
353         Reviewed by Antti Koivisto.
354
355         Merge https://chromium.googlesource.com/chromium/blink/+/45aadf7ee7ee010327eb692066cf013315ef3ed7
356
357         When parsing <form><template><input>, the previous behavior was to associate the <input> with the <form>,
358         even though they're not in the same tree (or even the same document).
359
360         This patch changes that by checking, prior to creating a form control element, whether the element to be
361         created lives in a document with a browsing context.
362
363         We don't update m_form as needed to faithfully match the HTML5 specification's form element pointer
364         http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#form-element-pointer
365         and its algorithm for creating and inserting nodes:
366         http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#creating-and-inserting-nodes
367
368         While this leaves isindex's reference to form element pointer stale:
369         http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#isindex
370         The HTML5 specification matches the behaviors of Chrome and Firefox so we leave it as is.
371
372         Test: fast/dom/HTMLTemplateElement/no-form-association.html
373
374         * html/parser/HTMLConstructionSite.cpp:
375         (WebCore::HTMLConstructionSite::createHTMLElement):
376
377 2013-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
378
379         [GTK] Cannot scroll in option menu when it larger than the screen
380         https://bugs.webkit.org/show_bug.cgi?id=124671
381
382         Reviewed by Martin Robinson.
383
384         The problem is that the popup menu is not resized to fit in the
385         screen, so it doesn't scroll and some of the items are offscreen
386         so they can't be selected either. GTK+ automatically resizes the
387         popup menus to fit in the work area, but only when the menu is
388         already positioned.
389
390         * platform/gtk/GtkPopupMenu.cpp:
391         (WebCore::GtkPopupMenu::popUp): Schedule a resize of the popup
392         menu right after showing it once it has a position.
393
394 2013-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
395
396         [GTK] Mark all deprecated symbols in GObject DOM bindings
397         https://bugs.webkit.org/show_bug.cgi?id=124406
398
399         Reviewed by Gustavo Noronha Silva.
400
401         Move deprecated API from WebKitDOMCustom to a new file
402         WebKitDOMDeprecated leaving in WebKitDOMCustom only the
403         non-deprecated API that is not autogenerated. Also added the
404         deprecation decorations and tags in the documentation.
405
406         * bindings/gobject/GNUmakefile.am:
407         * bindings/gobject/WebKitDOMCustom.cpp:
408         * bindings/gobject/WebKitDOMCustom.h:
409         * bindings/gobject/WebKitDOMCustom.symbols:
410         * bindings/gobject/WebKitDOMDeprecated.cpp: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp.
411         (webkit_dom_blob_webkit_slice):
412         (webkit_dom_html_element_get_id):
413         (webkit_dom_html_element_set_id):
414         (webkit_dom_html_element_get_class_name):
415         (webkit_dom_html_element_set_class_name):
416         (webkit_dom_html_element_get_class_list):
417         (webkit_dom_html_form_element_dispatch_form_change):
418         (webkit_dom_html_form_element_dispatch_form_input):
419         (webkit_dom_webkit_named_flow_get_overflow):
420         (webkit_dom_element_get_webkit_region_overflow):
421         (webkit_dom_webkit_named_flow_get_content_nodes):
422         (webkit_dom_webkit_named_flow_get_regions_by_content_node):
423         (webkit_dom_bar_info_get_property):
424         (webkit_dom_bar_info_class_init):
425         (webkit_dom_bar_info_init):
426         (webkit_dom_bar_info_get_visible):
427         (webkit_dom_console_get_memory):
428         (webkit_dom_css_style_declaration_get_property_css_value):
429         (webkit_dom_document_get_webkit_hidden):
430         (webkit_dom_document_get_webkit_visibility_state):
431         (webkit_dom_html_document_open):
432         (webkit_dom_html_element_set_item_id):
433         (webkit_dom_html_element_get_item_id):
434         (webkit_dom_html_element_get_item_ref):
435         (webkit_dom_html_element_get_item_prop):
436         (webkit_dom_html_element_set_item_scope):
437         (webkit_dom_html_element_get_item_scope):
438         (webkit_dom_html_element_get_item_type):
439         (webkit_dom_html_style_element_set_scoped):
440         (webkit_dom_html_style_element_get_scoped):
441         (webkit_dom_html_properties_collection_get_property):
442         (webkit_dom_html_properties_collection_class_init):
443         (webkit_dom_html_properties_collection_init):
444         (webkit_dom_html_properties_collection_item):
445         (webkit_dom_html_properties_collection_named_item):
446         (webkit_dom_html_properties_collection_get_length):
447         (webkit_dom_html_properties_collection_get_names):
448         (webkit_dom_node_get_attributes):
449         (webkit_dom_node_has_attributes):
450         (webkit_dom_memory_info_get_property):
451         (webkit_dom_memory_info_class_init):
452         (webkit_dom_memory_info_init):
453         (webkit_dom_memory_info_get_total_js_heap_size):
454         (webkit_dom_memory_info_get_used_js_heap_size):
455         (webkit_dom_memory_info_get_js_heap_size_limit):
456         (webkit_dom_micro_data_item_value_class_init):
457         (webkit_dom_micro_data_item_value_init):
458         (webkit_dom_performance_get_memory):
459         (webkit_dom_property_node_list_get_property):
460         (webkit_dom_property_node_list_class_init):
461         (webkit_dom_property_node_list_init):
462         (webkit_dom_property_node_list_item):
463         (webkit_dom_property_node_list_get_length):
464         (webkit_dom_html_media_element_get_start_time):
465         (webkit_dom_html_media_element_get_initial_time):
466         (webkit_dom_html_head_element_get_profile):
467         (webkit_dom_html_head_element_set_profile):
468         (webkit_dom_processing_instruction_get_data):
469         (webkit_dom_processing_instruction_set_data):
470         * bindings/gobject/WebKitDOMDeprecated.h: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.h.
471         * bindings/gobject/WebKitDOMDeprecated.symbols: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.symbols.
472         * bindings/scripts/CodeGeneratorGObject.pm:
473         (GenerateFunction): Do not include deprecation guards in the cpp file.
474         * bindings/scripts/gobject-generate-headers.pl: Do not create
475         fordward declarations for non-existent classes like Custom and
476         Deprecated.
477         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
478         (webkit_dom_test_event_target_dispatch_event):
479
480 2013-11-20  Jae Hyun Park  <jae.park@company100.net>
481
482         [CoordinatedGraphics] Use std::unique_ptrs rather than OwnPtrs
483         https://bugs.webkit.org/show_bug.cgi?id=124692
484
485         Reviewed by Noam Rosenthal.
486
487         No new tests, covered by existing ones.
488
489         * platform/graphics/TiledBackingStore.cpp:
490         (WebCore::TiledBackingStore::TiledBackingStore):
491         * platform/graphics/TiledBackingStore.h:
492         * platform/graphics/TiledBackingStoreBackend.h:
493         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
494         (WebCore::CoordinatedGraphicsLayer::createBackingStore):
495         * platform/graphics/texmap/coordinated/CoordinatedTile.h:
496
497 2013-11-20  Brady Eidson  <beidson@apple.com>
498
499         Add more infrastructure for ServerConnection communication between Web and Database processes
500         https://bugs.webkit.org/show_bug.cgi?id=124693
501
502         Reviewed by Anders Carlsson.
503
504         * WebCore.exp.in:
505
506 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
507
508         Hoist <template> to head when found between </head> and <body> for consistency with <script>
509         https://bugs.webkit.org/show_bug.cgi?id=123949
510
511         Reviewed by Antti Koivisto.
512
513         Merge https://chromium.googlesource.com/chromium/blink/+/835fb468fd211054a920fb7612a6dc5043662495
514
515         Move template elements between head and body elements into the head to be consistent with script elements.
516         The HTML5 specification was changed in http://html5.org/tools/web-apps-tracker?from=8217&to=8218.
517
518         Inline comments below are cited from https://www.w3.org/Bugs/Public/show_bug.cgi?id=23002
519         and https://codereview.chromium.org/25900003 for clarity.
520
521         * html/parser/HTMLTreeBuilder.cpp:
522         (WebCore::HTMLTreeBuilder::processStartTag): Add the template element to the list of elements to be hoisted into
523         the head element.
524         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
525
526         Replace the assertion that isParsingFragment is true when item->node() == m_tree.openElements()->rootNode() since,
527         with this change, we can now invoke resetInsertionMode when parsing a normal document (not fragment) and there is
528         only the html element on the stack of open elements.
529
530         For the second change, consider: <head></head><template>
531
532         This example breaks in the old HTML parser because the template element is handled by "after head" state which
533         pushes the head element back on, processes the template element for "in head", then pops the head element off.
534         EOF is reached, which processes a fake close tag for the template element, which pops the template element off
535         and resets the insertion mode appropriately
536
537         The problem here is that "reset the insertion mode" is going to inspect the bottom-most element on the stack which
538         is now the html element and it will set the mode to "before head". Nothing good happens after this.
539
540         We fix this problem by having the reset algorithm check if the head element pointer is set, and if so, go to after
541         head instead of before head.
542
543 2013-11-20  Radu Stavila  <stavila@adobe.com>
544
545         [CSS Regions] Implement visual overflow for first & last regions
546         https://bugs.webkit.org/show_bug.cgi?id=118665
547
548         In order to properly propagate the visual overflow of elements flowed inside regions, 
549         the responsiblity of painting and hit-testing content inside flow threads has been
550         moved to the flow thread layer's level.
551         Each region keeps the associated overflow with each box in the RenderBoxRegionInfo
552         structure, including one for the flow thread itself. This data is used during
553         painting and hit-testing.
554
555         Reviewed by David Hyatt.
556
557         Tests: fast/regions/overflow-first-and-last-regions-in-container-hidden.html
558                fast/regions/overflow-first-and-last-regions.html
559                fast/regions/overflow-nested-regions.html
560                fast/regions/overflow-region-float.html
561                fast/regions/overflow-region-inline.html
562                fast/regions/overflow-region-transform.html
563
564         * rendering/InlineFlowBox.cpp:
565         (WebCore::InlineFlowBox::setLayoutOverflow):
566         (WebCore::InlineFlowBox::setVisualOverflow):
567         * rendering/InlineFlowBox.h:
568         * rendering/RenderBlock.cpp:
569         (WebCore::RenderBlock::addOverflowFromChildren):
570         (WebCore::RenderBlock::paint):
571         (WebCore::RenderBlock::paintObject):
572         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
573         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
574         * rendering/RenderBlockFlow.cpp:
575         (WebCore::RenderBlockFlow::hasNextPage):
576         (WebCore::RenderBlockFlow::relayoutForPagination):
577         * rendering/RenderBlockLineLayout.cpp:
578         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
579         * rendering/RenderBox.cpp:
580         (WebCore::RenderBox::borderBoxRectInRegion):
581         (WebCore::RenderBox::computeRectForRepaint):
582         (WebCore::RenderBox::addLayoutOverflow):
583         (WebCore::RenderBox::addVisualOverflow):
584         (WebCore::RenderBox::isUnsplittableForPagination):
585         (WebCore::RenderBox::overflowRectForPaintRejection):
586         * rendering/RenderBox.h:
587         (WebCore::RenderBox::canHaveOutsideRegionRange):
588         * rendering/RenderBoxModelObject.cpp:
589         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
590         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
591         * rendering/RenderBoxModelObject.h:
592         * rendering/RenderBoxRegionInfo.h:
593         (WebCore::RenderBoxRegionInfo::createOverflow):
594         * rendering/RenderFlowThread.cpp:
595         (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
596         (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
597         (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
598         (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
599         (WebCore::RenderFlowThread::flipForWritingModeLocalCoordinates):
600         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
601         (WebCore::RenderFlowThread::addRegionsVisualOverflow):
602         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
603         * rendering/RenderFlowThread.h:
604         * rendering/RenderLayer.cpp:
605         (WebCore::RenderLayer::updateLayerPositions):
606         (WebCore::expandClipRectForRegionAndReflection):
607         (WebCore::expandClipRectForDescendantsAndReflection):
608         (WebCore::RenderLayer::paintLayer):
609         (WebCore::RenderLayer::paintLayerContents):
610         (WebCore::RenderLayer::updatePaintingInfoForFragments):
611         (WebCore::RenderLayer::paintForegroundForFragments):
612         (WebCore::RenderLayer::hitTest):
613         (WebCore::RenderLayer::hitTestLayer):
614         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
615         (WebCore::RenderLayer::calculateClipRects):
616         (WebCore::RenderLayer::parentClipRects):
617         (WebCore::RenderLayer::calculateRects):
618         (WebCore::RenderLayer::intersectsDamageRect):
619         (WebCore::RenderLayer::updateDescendantsLayerListsIfNeeded):
620         (WebCore::RenderLayer::repaintIncludingDescendants):
621         (WebCore::RenderLayer::paintNamedFlowThreadInsideRegion):
622         (WebCore::RenderLayer::paintFlowThreadIfRegion):
623         (WebCore::RenderLayer::hitTestFlowThreadIfRegion):
624         * rendering/RenderLayer.h:
625         (WebCore::ClipRect::inflateX):
626         (WebCore::ClipRect::inflateY):
627         (WebCore::ClipRect::inflate):
628         * rendering/RenderLayerCompositor.cpp:
629         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
630         * rendering/RenderListItem.cpp:
631         (WebCore::RenderListItem::addOverflowFromChildren):
632         * rendering/RenderMultiColumnSet.cpp:
633         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
634         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
635         * rendering/RenderMultiColumnSet.h:
636         * rendering/RenderNamedFlowFragment.cpp:
637         (WebCore::RenderNamedFlowFragment::createStyle):
638         (WebCore::RenderNamedFlowFragment::namedFlowThread):
639         * rendering/RenderNamedFlowFragment.h:
640         * rendering/RenderOverflow.h:
641         * rendering/RenderRegion.cpp:
642         (WebCore::RenderRegion::flowThreadPortionOverflowRect):
643         (WebCore::RenderRegion::flowThreadPortionLocation):
644         (WebCore::RenderRegion::regionContainerLayer):
645         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
646         (WebCore::RenderRegion::computeOverflowFromFlowThread):
647         (WebCore::RenderRegion::repaintFlowThreadContent):
648         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
649         (WebCore::RenderRegion::insertedIntoTree):
650         (WebCore::RenderRegion::ensureOverflowForBox):
651         (WebCore::RenderRegion::rectFlowPortionForBox):
652         (WebCore::RenderRegion::addLayoutOverflowForBox):
653         (WebCore::RenderRegion::addVisualOverflowForBox):
654         (WebCore::RenderRegion::layoutOverflowRectForBox):
655         (WebCore::RenderRegion::visualOverflowRectForBox):
656         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
657         * rendering/RenderRegion.h:
658         * rendering/RenderReplaced.cpp:
659         (WebCore::RenderReplaced::shouldPaint):
660         * rendering/RootInlineBox.cpp:
661         (WebCore::RootInlineBox::paint):
662
663 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
664
665         [HTML parser] reset insertion mode appropriate must check for "in select in table" mode
666         https://bugs.webkit.org/show_bug.cgi?id=123850
667
668         Reviewed by Antti Koivisto.
669
670         Merge https://chromium.googlesource.com/chromium/blink/+/2cb7523df57dfb48111f6aa16b7138cd54024ba7
671
672         The HTML specification has been updated to detect encountering a template element inside of a select element,
673         which in turn is inside of a table element. In this case, the select element will cause the parser to be in
674         "InSelectInTable" mode. Thus when the template element closes, it should return to that mode.
675
676         The fix here is that resetInsertionModeAppropriately must continue looking up the stack if the first node is
677         select element to see whether the select element is inside of a table element.
678
679         See also: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#reset-the-insertion-mode-appropriately
680
681         Test: html5lib/resources/template.dat
682
683         * html/parser/HTMLTreeBuilder.cpp:
684         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
685
686 2013-11-20  Mark Lam  <mark.lam@apple.com>
687
688         Build fix for last commit.
689         https://bugs.webkit.org/show_bug.cgi?id=124634.
690
691         Not reviewed.
692
693         No new tests.
694
695         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
696
697 2013-11-20  Mark Lam  <mark.lam@apple.com>
698
699         Introducing VMEntryScope to update the VM stack limit.
700         https://bugs.webkit.org/show_bug.cgi?id=124634.
701
702         Reviewed by Geoffrey Garen.
703
704         No new tests.
705
706         Renamed dynamicGlobalObject() to vmEntryGlobalObject().
707         Replaced uses of DynamicGlobalObjectScope with VMEntryScope.
708
709         * ForwardingHeaders/runtime/VMEntryScope.h: Added.
710         * WebCore.vcxproj/WebCore.vcxproj:
711         * WebCore.vcxproj/WebCore.vcxproj.filters:
712         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
713         (WebCore::JSCryptoAlgorithmBuilder::add):
714         * bindings/js/JSCustomXPathNSResolver.cpp:
715         (WebCore::JSCustomXPathNSResolver::create):
716         * bindings/js/JSDOMBinding.cpp:
717         (WebCore::firstDOMWindow):
718         * bindings/js/JSErrorHandler.cpp:
719         (WebCore::JSErrorHandler::handleEvent):
720         * bindings/js/JSEventListener.cpp:
721         (WebCore::JSEventListener::handleEvent):
722         * bindings/js/JavaScriptCallFrame.h:
723         (WebCore::JavaScriptCallFrame::vmEntryGlobalObject):
724         * bindings/js/PageScriptDebugServer.cpp:
725         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
726         * bindings/js/ScriptDebugServer.cpp:
727         (WebCore::ScriptDebugServer::evaluateBreakpointAction):
728         (WebCore::ScriptDebugServer::handlePause):
729         * bindings/js/WorkerScriptDebugServer.cpp:
730         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
731         * bindings/objc/WebScriptObject.mm:
732         (WebCore::addExceptionToConsole):
733         * bridge/c/c_utility.cpp:
734         (JSC::Bindings::convertValueToNPVariant):
735         * bridge/objc/objc_instance.mm:
736         (ObjcInstance::moveGlobalExceptionToExecState):
737         * bridge/objc/objc_runtime.mm:
738         (JSC::Bindings::convertValueToObjcObject):
739         * bridge/objc/objc_utility.mm:
740         (JSC::Bindings::convertValueToObjcValue):
741
742 2013-11-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
743
744         Generate toHTMLFooElement() to clean up static_cast<>
745         https://bugs.webkit.org/show_bug.cgi?id=124571
746
747         Reviewed by Ryosuke Niwa.
748
749         Though there are a lot of clean up commits before, there are still
750         use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
751         toHTMLDetails|Meta|Summary|TableCaptionElement().
752
753         Additionally, other static_cast<> are removed as well.
754
755         No new tests, no behavior changes.
756
757         * html/HTMLDetailsElement.h:
758         * html/HTMLMediaElement.cpp:
759         (HTMLMediaElement::selectNextSourceChild):
760         * html/HTMLMetaElement.h:
761         * html/HTMLObjectElement.cpp:
762         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
763         * html/HTMLOptionElement.cpp:
764         (WebCore::HTMLOptionElement::isDisabledFormControl):
765         * html/HTMLPlugInImageElement.cpp:
766         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
767         * html/HTMLSummaryElement.cpp:
768         (WebCore::HTMLSummaryElement::detailsElement):
769         * html/HTMLSummaryElement.h:
770         * html/HTMLTableCaptionElement.h:
771         * html/HTMLTableElement.cpp:
772         (WebCore::HTMLTableElement::caption):
773         * html/HTMLTagNames.in:
774         * html/MediaDocument.cpp:
775         (WebCore::MediaDocumentParser::createDocumentStructure):
776         * html/shadow/DetailsMarkerControl.cpp:
777         (WebCore::DetailsMarkerControl::summaryElement):
778         * loader/FrameLoader.cpp:
779         (WebCore::FrameLoader::handleFallbackContent):
780         * loader/ImageLoader.cpp:
781         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
782         * page/DragController.cpp:
783         (WebCore::DragController::canProcessDrag):
784         * page/Frame.cpp:
785         (WebCore::Frame::searchForLabelsBeforeElement):
786         * page/SpatialNavigation.cpp:
787         (WebCore::frameOwnerElement):
788
789 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
790
791         Clear TemplateContentDocumentFragment::m_host when HTMLTemplateElement is destroyed
792         https://bugs.webkit.org/show_bug.cgi?id=122806
793
794         Reviewed by Antti Koivisto.
795
796         Merge https://chromium.googlesource.com/chromium/blink/+/858ed5f6341de9d900768c1f4668fcfce870c52e
797
798         The document fragment of a template element outlives the element itself.
799         Clear the host property on the document fragment when that happens.
800
801         Test: fast/dom/HTMLTemplateElement/content-outlives-template-crash.html
802
803         * dom/TemplateContentDocumentFragment.h:
804         * html/HTMLTemplateElement.cpp:
805         (WebCore::HTMLTemplateElement::~HTMLTemplateElement):
806         * html/HTMLTemplateElement.h:
807
808 2013-11-20  Chris Fleizach  <cfleizach@apple.com>
809
810         AX: Implement CSS -webkit-alt property (text alternative for generated content pseudo-elements ::before and ::after)
811         https://bugs.webkit.org/show_bug.cgi?id=120188
812
813         Reviewed by Dean Jackson.
814
815         Add a -webkit-alt CSS property that can be used to label Image content or Text content for accessibility clients.
816
817         To accomplish this, it sets the string in the RenderStyle. Then when the ContentData creates an anonymous renderer,
818         it sets that string on the TextFragment or RenderImage, which can be queried by accessibility code.
819
820         Test: platform/mac/accessibility/webkit-alt-for-css-content.html
821
822         * accessibility/AccessibilityNodeObject.cpp:
823         (WebCore::AccessibilityNodeObject::alternativeText):
824         * accessibility/AccessibilityRenderObject.cpp:
825         (WebCore::AccessibilityRenderObject::textUnderElement):
826         (WebCore::objectInclusionFromAltText):
827         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
828         * css/CSSComputedStyleDeclaration.cpp:
829         (WebCore::altTextToCSSValue):
830         (WebCore::ComputedStyleExtractor::propertyValue):
831         * css/CSSParser.cpp:
832         (WebCore::CSSParser::parseValue):
833         (WebCore::CSSParser::parseAlt):
834         * css/CSSParser.h:
835         * css/CSSPropertyNames.in:
836         * css/StyleResolver.cpp:
837         (WebCore::StyleResolver::applyProperty):
838         * rendering/RenderImage.h:
839         (WebCore::RenderImage::altText):
840         (WebCore::RenderImage::setAltText):
841         * rendering/RenderTextFragment.h:
842         * rendering/style/ContentData.cpp:
843         (WebCore::ImageContentData::createRenderer):
844         (WebCore::TextContentData::createRenderer):
845         * rendering/style/ContentData.h:
846         (WebCore::ContentData::setAltText):
847         (WebCore::ContentData::altText):
848         * rendering/style/RenderStyle.cpp:
849         (WebCore::RenderStyle::setContent):
850         (WebCore::RenderStyle::setContentAltText):
851         (WebCore::RenderStyle::contentAltText):
852         * rendering/style/RenderStyle.h:
853         * rendering/style/StyleRareNonInheritedData.h:
854
855 2013-11-20  Roger Fong  <roger_fong@apple.com>
856
857         Use compile flag SH_UNFOLD_SHORT_CIRCUIT when compiling shaders.
858         https://bugs.webkit.org/show_bug.cgi?id=124684.
859
860         Reviewed by Brent Fulgham.
861
862         Existing test webgl/1.0.2/conformance/glsl/misc/shader-with-short-circuiting-operators.html
863
864         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
865         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
866
867 2013-11-20  Robert Sipka  <sipka@inf.u-szeged.hu>
868
869         [curl] Improve detecting and handling of SSL related errors
870         https://bugs.webkit.org/show_bug.cgi?id=119436
871
872         Reviewed by Brent Fulgham.
873
874         Set the exact SSL verification error on CURL
875         and store the enabled domain with certificate.
876
877         * WebCore.vcxproj/WebCore.vcxproj:
878         * WebCore.vcxproj/WebCore.vcxproj.filters:
879         * platform/network/ResourceHandle.h:
880         * platform/network/ResourceHandleInternal.h:
881         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
882         * platform/network/curl/ResourceError.h:
883         (WebCore::ResourceError::ResourceError):
884         (WebCore::ResourceError::sslErrors):
885         (WebCore::ResourceError::setSSLErrors):
886         * platform/network/curl/ResourceHandleCurl.cpp:
887         (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
888         * platform/network/curl/ResourceHandleManager.cpp:
889         (WebCore::ResourceHandleManager::downloadTimerCallback):
890         (WebCore::ResourceHandleManager::initializeHandle):
891         * platform/network/curl/SSLHandle.cpp: Added.
892         (WebCore::allowsAnyHTTPSCertificateHosts):
893         (WebCore::sslIgnoreHTTPSCertificate):
894         (WebCore::sslCertificateFlag):
895         (WebCore::pemData):
896         (WebCore::certVerifyCallback):
897         (WebCore::sslctxfun):
898         (WebCore::setSSLVerifyOptions):
899         * platform/network/curl/SSLHandle.h: Added.
900
901 2013-11-20  Bem Jones-Bey  <bjonesbe@adobe.com>
902
903         [css shapes] Parse new circle shape syntax
904         https://bugs.webkit.org/show_bug.cgi?id=124618
905
906         Reviewed by Antti Koivisto.
907
908         Implement parsing of the new cicle shape syntax. The implementation of
909         the old syntax has been move aside as deprecated, and will be removed
910         once the new syntax is stable.
911
912         Updated existing parsing tests to cover this.
913
914         * css/BasicShapeFunctions.cpp:
915         (WebCore::valueForCenterCoordinate): Create a CSSPrimitiveValue from a
916             BasicShapeCenterCoordinate.
917         (WebCore::valueForBasicShape): Convert new basic shape and rename old
918             one.
919         (WebCore::convertToCenterCoordinate): Create a
920             BasicShapeCenterCoordinate from a CSSPrimitiveValue.
921         (WebCore::basicShapeForValue): Convert new shape value and rename old
922             one.
923         * css/CSSBasicShapes.cpp:
924         (WebCore::buildCircleString): Build a new circle string.
925         (WebCore::CSSBasicShapeCircle::cssText): Serialize the new circle
926             shape.
927         (WebCore::CSSBasicShapeCircle::equals): Compare new circle shapes.
928         (WebCore::CSSBasicShapeCircle::serializeResolvingVariables):
929         * css/CSSBasicShapes.h:
930         (WebCore::CSSBasicShapeCircle::CSSBasicShapeCircle): Add class for new
931             circle shape.
932         (WebCore::CSSDeprecatedBasicShapeCircle::create): Renamed to move out
933             of the way of the new circle implementation.
934         (WebCore::CSSDeprecatedBasicShapeCircle::centerX): Ditto.
935         (WebCore::CSSDeprecatedBasicShapeCircle::centerY): Ditto.
936         (WebCore::CSSDeprecatedBasicShapeCircle::radius): Ditto.
937         (WebCore::CSSDeprecatedBasicShapeCircle::setCenterX): Ditto.
938         (WebCore::CSSDeprecatedBasicShapeCircle::setCenterY): Ditto.
939         (WebCore::CSSDeprecatedBasicShapeCircle::setRadius): Ditto.
940         (WebCore::CSSDeprecatedBasicShapeCircle::CSSDeprecatedBasicShapeCircle): Ditto.
941         * css/CSSParser.cpp:
942         (WebCore::CSSParser::parseShapeRadius): Parse the radius for the new
943             circle syntax. Will also be used by the new ellipse syntax.
944         (WebCore::CSSParser::parseBasicShapeCircle): Parse the new circle
945             syntax.
946         (WebCore::CSSParser::parseDeprecatedBasicShapeCircle): Rename to make
947             way for the new implementation.
948         (WebCore::isDeprecatedBasicShape): Check if we have a new circle or an
949             old circle.
950         (WebCore::CSSParser::parseBasicShape): Update to parse the new circle
951             syntax.
952         * css/CSSParser.h:
953         * css/CSSValueKeywords.in: Add support for the new circle keywords.
954         * rendering/shapes/Shape.cpp:
955         (WebCore::Shape::createShape): 
956         * rendering/style/BasicShapes.cpp: Deprecate old circle and add stub
957             for layout code.
958         (WebCore::DeprecatedBasicShapeCircle::path): Rename to make way for
959             the new implementation.
960         (WebCore::DeprecatedBasicShapeCircle::blend): Rename to make way for
961             the new implementation.
962         (WebCore::BasicShapeCircle::path): Create path for new circle shape.
963         (WebCore::BasicShapeCircle::blend): Interpolate the new circle shape.
964         * rendering/style/BasicShapes.h:
965         (WebCore::BasicShapeCenterCoordinate::BasicShapeCenterCoordinate):
966             Represent an x or y coordinate for the center of a new circle,
967             since it can be either a keyword along with an offset that cannot
968             be resolved until layout time or an ordinary Length. This will
969             also be used by the new ellipse implementation.
970         (WebCore::BasicShapeCenterCoordinate::keyword):
971         (WebCore::BasicShapeCenterCoordinate::length):
972         (WebCore::BasicShapeCenterCoordinate::blend): Interpolate.
973         (WebCore::BasicShapeRadius::BasicShapeRadius): Represent the radius of
974             a new circle shape since it can either be a straightforward Length or
975             a keyword that cannot be resolved until layout time.
976         (WebCore::BasicShapeRadius::value):
977         (WebCore::BasicShapeRadius::type):
978         (WebCore::BasicShapeRadius::blend): Interpolate.
979         (WebCore::BasicShapeCircle::centerX):
980         (WebCore::BasicShapeCircle::centerY):
981         (WebCore::BasicShapeCircle::radius):
982         (WebCore::BasicShapeCircle::setCenterX):
983         (WebCore::BasicShapeCircle::setCenterY):
984         (WebCore::BasicShapeCircle::setRadius):
985         (WebCore::BasicShapeCircle::BasicShapeCircle): New circle class.
986         (WebCore::DeprecatedBasicShapeCircle::create): Rename to make room for
987             new circle implementation.
988         (WebCore::DeprecatedBasicShapeCircle::DeprecatedBasicShapeCircle): Ditto.
989
990 2013-11-20  Hans Muller  <hmuller@adobe.com>
991
992         [CSS Shapes] Add BoxShape and FloatRoundingRect classes
993         https://bugs.webkit.org/show_bug.cgi?id=124368
994
995         Reviewed by Dean Jackson.
996
997         Added the BoxShape class. It's now used to represent shape-outside box
998         values: [margin/border/padding/content]-box. BoxShape depends on a new
999         FloatRoundedRect class, which is a float analog of the existing (int)
1000         RoundedRect class. The FloatRoundedRect class contains the same basic
1001         methods and accessors as BorderRect and adds a set of four methods,
1002         for example topLeftCorner(), that return a FloatRect that represents the
1003         bounds of one elliptical corner. I also added a method, xInterceptsAtY()
1004         that returns two X coordinates of the intersection between a horizontal
1005         line and the rounded rectangle.
1006
1007         No new tests, this is just an internal refactoring.
1008
1009         * CMakeLists.txt:
1010         * GNUmakefile.list.am:
1011         * WebCore.vcxproj/WebCore.vcxproj:
1012         * WebCore.vcxproj/WebCore.vcxproj.filters:
1013         * WebCore.xcodeproj/project.pbxproj:
1014         * platform/graphics/FloatRoundedRect.cpp: Added.
1015         (WebCore::FloatRoundedRect::FloatRoundedRect):
1016         (WebCore::FloatRoundedRect::Radii::isZero):
1017         (WebCore::FloatRoundedRect::Radii::scale):
1018         (WebCore::FloatRoundedRect::Radii::expand):
1019         (WebCore::cornerRectIntercept):
1020         (WebCore::FloatRoundedRect::xInterceptsAtY):
1021         * platform/graphics/FloatRoundedRect.h: Added.
1022         (WebCore::FloatRoundedRect::Radii::Radii):
1023         (WebCore::FloatRoundedRect::Radii::setTopLeft):
1024         (WebCore::FloatRoundedRect::Radii::setTopRight):
1025         (WebCore::FloatRoundedRect::Radii::setBottomLeft):
1026         (WebCore::FloatRoundedRect::Radii::setBottomRight):
1027         (WebCore::FloatRoundedRect::Radii::topLeft):
1028         (WebCore::FloatRoundedRect::Radii::topRight):
1029         (WebCore::FloatRoundedRect::Radii::bottomLeft):
1030         (WebCore::FloatRoundedRect::Radii::bottomRight):
1031         (WebCore::FloatRoundedRect::Radii::expand):
1032         (WebCore::FloatRoundedRect::Radii::shrink):
1033         (WebCore::FloatRoundedRect::rect):
1034         (WebCore::FloatRoundedRect::radii):
1035         (WebCore::FloatRoundedRect::isRounded):
1036         (WebCore::FloatRoundedRect::isEmpty):
1037         (WebCore::FloatRoundedRect::setRect):
1038         (WebCore::FloatRoundedRect::setRadii):
1039         (WebCore::FloatRoundedRect::move):
1040         (WebCore::FloatRoundedRect::inflate):
1041         (WebCore::FloatRoundedRect::expandRadii):
1042         (WebCore::FloatRoundedRect::shrinkRadii):
1043         (WebCore::FloatRoundedRect::topLeftCorner):
1044         (WebCore::FloatRoundedRect::topRightCorner):
1045         (WebCore::FloatRoundedRect::bottomLeftCorner):
1046         (WebCore::FloatRoundedRect::bottomRightCorner):
1047         (WebCore::operator==):
1048         * rendering/shapes/BoxShape.cpp: Added.
1049         (WebCore::BoxShape::BoxShape):
1050         (WebCore::BoxShape::getExcludedIntervals):
1051         (WebCore::BoxShape::getIncludedIntervals):
1052         (WebCore::BoxShape::firstIncludedIntervalLogicalTop):
1053         * rendering/shapes/BoxShape.h: Added.
1054         * rendering/shapes/Shape.cpp:
1055         (WebCore::createBoxShape):
1056         (WebCore::Shape::createShape):
1057
1058 2013-11-20  Antti Koivisto  <antti@apple.com>
1059
1060         Simple line layout should support floats
1061         https://bugs.webkit.org/show_bug.cgi?id=124666
1062
1063         Reviewed by Dave Hyatt.
1064
1065         Tests: fast/text/simple-lines-float-compare.html
1066                fast/text/simple-lines-float.html
1067
1068         * rendering/line/LineWidth.h:
1069         (WebCore::LineWidth::logicalLeftOffset):
1070         
1071             Expose the left offset so we don't need to recompute it.
1072
1073         * rendering/SimpleLineLayout.cpp:
1074         (WebCore::SimpleLineLayout::canUseFor):
1075         (WebCore::SimpleLineLayout::computeLineLeft):
1076         
1077             Include the left offset from floats.
1078
1079         (WebCore::SimpleLineLayout::createTextRuns):
1080         
1081             Keep the flow height updated during the loop as LineWidth reads the current position from there.
1082
1083         * rendering/SimpleLineLayoutResolver.h:
1084         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
1085         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
1086         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
1087         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
1088         
1089             We now bake the border and the padding to the line left offset. No need to add it during resolve.
1090
1091 2013-11-20  Alexey Proskuryakov  <ap@apple.com>
1092
1093         Use std::function callbacks in CryptoAlgorithm instead of JS promises
1094         https://bugs.webkit.org/show_bug.cgi?id=124673
1095
1096         Reviewed by Anders Carlsson.
1097
1098         To implement key wrapping/unwrapping, we'll need to chain existing operations.
1099         It's much easier to do with C++ callbacks than with functions fulfilling JS
1100         promises directly.
1101
1102         Also, this will decouple CryptoAlgorithm from JS, which is nice.
1103
1104         SubtleCrypto IDL says that all functions return Promise<any>, but in reality,
1105         there is very little polymorphism, the only function whose return type depends
1106         on algorithm is generateKey (it can create a Key or a KeyPair).
1107
1108         * bindings/js/JSDOMPromise.cpp:
1109         (WebCore::PromiseWrapper::PromiseWrapper):
1110         (WebCore::PromiseWrapper::operator=):
1111         * bindings/js/JSDOMPromise.h:
1112         Made it copyable, as each crypto function wraps the promise in success and failure
1113         functional objects now.
1114
1115         * bindings/js/JSSubtleCryptoCustom.cpp:
1116         (WebCore::JSSubtleCrypto::encrypt):
1117         (WebCore::JSSubtleCrypto::decrypt):
1118         (WebCore::JSSubtleCrypto::sign):
1119         (WebCore::JSSubtleCrypto::verify):
1120         (WebCore::JSSubtleCrypto::digest):
1121         (WebCore::JSSubtleCrypto::generateKey):
1122         (WebCore::JSSubtleCrypto::importKey):
1123         (WebCore::JSSubtleCrypto::exportKey):
1124         * crypto/CryptoAlgorithm.cpp:
1125         (WebCore::CryptoAlgorithm::encrypt):
1126         (WebCore::CryptoAlgorithm::decrypt):
1127         (WebCore::CryptoAlgorithm::sign):
1128         (WebCore::CryptoAlgorithm::verify):
1129         (WebCore::CryptoAlgorithm::digest):
1130         (WebCore::CryptoAlgorithm::generateKey):
1131         (WebCore::CryptoAlgorithm::deriveKey):
1132         (WebCore::CryptoAlgorithm::deriveBits):
1133         (WebCore::CryptoAlgorithm::importKey):
1134         * crypto/CryptoAlgorithm.h:
1135         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
1136         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
1137         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
1138         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
1139         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
1140         (WebCore::CryptoAlgorithmAES_CBC::importKey):
1141         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
1142         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
1143         (WebCore::CryptoAlgorithmHMAC::generateKey):
1144         (WebCore::CryptoAlgorithmHMAC::importKey):
1145         * crypto/algorithms/CryptoAlgorithmHMAC.h:
1146         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
1147         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
1148         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
1149         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
1150         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
1151         (WebCore::CryptoAlgorithmSHA1::digest):
1152         * crypto/algorithms/CryptoAlgorithmSHA1.h:
1153         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
1154         (WebCore::CryptoAlgorithmSHA224::digest):
1155         * crypto/algorithms/CryptoAlgorithmSHA224.h:
1156         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
1157         (WebCore::CryptoAlgorithmSHA256::digest):
1158         * crypto/algorithms/CryptoAlgorithmSHA256.h:
1159         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
1160         (WebCore::CryptoAlgorithmSHA384::digest):
1161         * crypto/algorithms/CryptoAlgorithmSHA384.h:
1162         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
1163         (WebCore::CryptoAlgorithmSHA512::digest):
1164         * crypto/algorithms/CryptoAlgorithmSHA512.h:
1165         * crypto/keys/CryptoKeyRSA.h:
1166         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
1167         (WebCore::transformAES_CBC):
1168         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
1169         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
1170         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
1171         (WebCore::CryptoAlgorithmHMAC::sign):
1172         (WebCore::CryptoAlgorithmHMAC::verify):
1173         * crypto/mac/CryptoKeyRSAMac.cpp:
1174         (WebCore::CryptoKeyRSA::generatePair):
1175
1176 2013-11-20  Robert Hogan  <robert@webkit.org>
1177
1178         REGRESSION(r127163): Respect clearance set on ancestors when placing floats
1179         https://bugs.webkit.org/show_bug.cgi?id=119979
1180
1181         Reviewed by David Hyatt.
1182
1183         Refactor the way self-collapsing blocks with clearance are positioned so that they
1184         get the correct logical-top position during margin-collapsing.
1185
1186         Test: fast/block/margin-collapse/self-collapsing-block-with-float-descendants.html
1187
1188         * rendering/RenderBlockFlow.cpp:
1189         (WebCore::RenderBlockFlow::clearFloats):
1190         (WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
1191         (WebCore::RenderBlockFlow::collapseMargins):
1192         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
1193         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
1194         * rendering/RenderBlockFlow.h:
1195
1196 2013-11-20  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1197
1198         [GTK] Remove Chromium as user agent and claim to be Safari in OS X
1199         https://bugs.webkit.org/show_bug.cgi?id=124229
1200
1201         Reviewed by Martin Robinson.
1202
1203         http://www.duolingo.com/ doesn't get render correctly because it uses
1204         Chrome/Chromium specific variables, added after it was forked. Because
1205         of this, it is necessary to remove the Chrome/Chromium identification
1206         in the user agent. Also, from now on, by default, The GTK+ port will
1207         claim to be Safari in OS X to avoid loading wrong resources.
1208
1209         * platform/gtk/UserAgentGtk.cpp:
1210         (WebCore::standardUserAgent):
1211
1212 2013-11-20  Commit Queue  <commit-queue@webkit.org>
1213
1214         Unreviewed, rolling out r159551.
1215         http://trac.webkit.org/changeset/159551
1216         https://bugs.webkit.org/show_bug.cgi?id=124669
1217
1218         made many tests asserts (Requested by anttik on #webkit).
1219
1220         * html/HTMLDetailsElement.h:
1221         * html/HTMLMediaElement.cpp:
1222         (HTMLMediaElement::selectNextSourceChild):
1223         * html/HTMLMetaElement.h:
1224         * html/HTMLObjectElement.cpp:
1225         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
1226         * html/HTMLOptionElement.cpp:
1227         (WebCore::HTMLOptionElement::isDisabledFormControl):
1228         * html/HTMLPlugInImageElement.cpp:
1229         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
1230         * html/HTMLSummaryElement.cpp:
1231         (WebCore::HTMLSummaryElement::detailsElement):
1232         * html/HTMLSummaryElement.h:
1233         * html/HTMLTableCaptionElement.h:
1234         * html/HTMLTableElement.cpp:
1235         (WebCore::HTMLTableElement::caption):
1236         (WebCore::HTMLTableElement::tHead):
1237         (WebCore::HTMLTableElement::tFoot):
1238         (WebCore::HTMLTableElement::lastBody):
1239         * html/HTMLTableRowElement.cpp:
1240         (WebCore::HTMLTableRowElement::rowIndex):
1241         * html/HTMLTableSectionElement.h:
1242         * html/HTMLTagNames.in:
1243         * html/MediaDocument.cpp:
1244         (WebCore::MediaDocumentParser::createDocumentStructure):
1245         * html/shadow/DetailsMarkerControl.cpp:
1246         (WebCore::DetailsMarkerControl::summaryElement):
1247         * loader/FrameLoader.cpp:
1248         (WebCore::FrameLoader::handleFallbackContent):
1249         * loader/ImageLoader.cpp:
1250         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
1251         * page/DragController.cpp:
1252         (WebCore::DragController::canProcessDrag):
1253         * page/Frame.cpp:
1254         (WebCore::Frame::searchForLabelsBeforeElement):
1255         * page/SpatialNavigation.cpp:
1256         (WebCore::frameOwnerElement):
1257
1258 2013-11-20  Zoltan Horvath  <zoltan@webkit.org>
1259
1260         Move LineWidth.{h,cpp} into rendering/line
1261         <https://webkit.org/b/124448>
1262
1263         Reviewed by David Hyatt.
1264
1265         In r159354 I introduced line directory. Now it's time to move the helper classes of RenderBlockLineLayout into 'line' subdirectory.
1266
1267         No new tests, no behavior change.
1268
1269         * CMakeLists.txt:
1270         * GNUmakefile.list.am:
1271         * WebCore.vcxproj/WebCore.vcxproj:
1272         * WebCore.vcxproj/WebCore.vcxproj.filters:
1273         * WebCore.xcodeproj/project.pbxproj:
1274         * rendering/line/LineWidth.cpp: Renamed from Source/WebCore/rendering/LineWidth.cpp.
1275         (WebCore::LineWidth::LineWidth):
1276         (WebCore::LineWidth::fitsOnLine):
1277         (WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
1278         (WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
1279         (WebCore::LineWidth::updateAvailableWidth):
1280         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
1281         (WebCore::LineWidth::commit):
1282         (WebCore::LineWidth::applyOverhang):
1283         (WebCore::LineWidth::fitBelowFloats):
1284         (WebCore::LineWidth::setTrailingWhitespaceWidth):
1285         (WebCore::LineWidth::updateCurrentShapeSegment):
1286         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
1287         (WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
1288         * rendering/line/LineWidth.h: Renamed from Source/WebCore/rendering/LineWidth.h.
1289         (WebCore::LineWidth::currentWidth):
1290         (WebCore::LineWidth::uncommittedWidth):
1291         (WebCore::LineWidth::committedWidth):
1292         (WebCore::LineWidth::availableWidth):
1293         (WebCore::LineWidth::addUncommittedWidth):
1294         (WebCore::LineWidth::shouldIndentText):
1295
1296 2013-11-20  Brady Eidson  <beidson@apple.com>
1297
1298         Alphabetization followup to r159567
1299
1300         Reviewed by style-bot  :(
1301
1302         * Modules/indexeddb/IDBDatabaseBackend.h:
1303         * Modules/indexeddb/IDBIndex.h:
1304         * Modules/indexeddb/IDBObjectStore.h:
1305         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1306         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1307         * inspector/InspectorIndexedDBAgent.cpp:
1308
1309 2013-11-20  Brady Eidson  <beidson@apple.com>
1310
1311         Rename IDBMetadata.h to IDBDatabaseMetadata.h
1312         https://bugs.webkit.org/show_bug.cgi?id=124668
1313
1314         Reviewed by Dean Jackson.
1315
1316         * GNUmakefile.list.am:
1317         * WebCore.xcodeproj/project.pbxproj:
1318
1319         * Modules/indexeddb/IDBDatabase.h:
1320         * Modules/indexeddb/IDBDatabaseBackend.h:
1321
1322         * Modules/indexeddb/IDBDatabaseMetadata.h: Renamed from Source/WebCore/Modules/indexeddb/IDBMetadata.h.
1323         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
1324         (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
1325         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
1326
1327         * Modules/indexeddb/IDBIndex.h:
1328         * Modules/indexeddb/IDBObjectStore.h:
1329         * Modules/indexeddb/IDBServerConnection.h:
1330         * Modules/indexeddb/IDBTransaction.h:
1331         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1332         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1333         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h:
1334         * inspector/InspectorIndexedDBAgent.cpp:
1335
1336 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
1337
1338         Remove bogus assertions in updateNameForTreeScope and updateNameForDocument
1339         https://bugs.webkit.org/show_bug.cgi?id=124639
1340
1341         Reviewed by Darin Adler.
1342
1343         Removed assertions. We can't assert that the element in a tree scope or a document
1344         since these two functions are called from removedFrom.
1345
1346         * dom/Element.cpp:
1347         (WebCore::Element::updateNameForTreeScope):
1348         (WebCore::Element::updateNameForDocument):
1349
1350 2013-11-20  Brady Eidson  <beidson@apple.com>
1351
1352         Cleanup getOrEstablishIDBDatabaseMetadata and stub it out in WK2
1353         https://bugs.webkit.org/show_bug.cgi?id=124635
1354
1355         Reviewed by Tim Horton.
1356
1357         getOrEstablishIDBDatabaseMetadata() should not have to take a database name parameter because the 
1358         server connection should already know what database name it represents.
1359
1360         * Modules/indexeddb/IDBDatabaseBackend.cpp:
1361         (WebCore::IDBDatabaseBackend::openInternalAsync):
1362
1363         * Modules/indexeddb/IDBServerConnection.h:
1364         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
1365         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
1366         (WebCore::IDBServerConnectionLevelDB::getOrEstablishIDBDatabaseMetadata):
1367         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
1368
1369         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1370         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
1371         (WebCore::IDBFactoryBackendLevelDB::open):
1372
1373 2013-11-20  Andrzej Badowski  <a.badowski@samsung.com>
1374
1375         [EFL] <video> and <audio> should be accessible.
1376         https://bugs.webkit.org/show_bug.cgi?id=124494
1377
1378         Reviewed by Gyuyoung Kim.
1379
1380         Adding descriptions of media-element controls.
1381
1382         * platform/efl/LocalizedStringsEfl.cpp:
1383         (WebCore::localizedMediaControlElementString):
1384
1385 2013-11-20  Antti Koivisto  <antti@apple.com>
1386
1387         Don't paint simple text runs outside the paint rect
1388         https://bugs.webkit.org/show_bug.cgi?id=124651
1389
1390         Reviewed by Anders Carlsson.
1391         
1392         This speeds up partial paints for long text paragraphs. 
1393         Also add the same optimization for hit testing.
1394
1395         * rendering/SimpleLineLayoutFunctions.cpp:
1396         (WebCore::SimpleLineLayout::paintFlow):
1397         
1398             Iterate over the run range that needs painting.
1399
1400         (WebCore::SimpleLineLayout::hitTestFlow):
1401         
1402             Iterate over the line range that needs painting.
1403
1404         * rendering/SimpleLineLayoutResolver.h:
1405         (WebCore::SimpleLineLayout::Range::Range):
1406         (WebCore::SimpleLineLayout::Range::begin):
1407         (WebCore::SimpleLineLayout::Range::end):
1408         
1409             Add Range type.
1410
1411         (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
1412         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator++):
1413         (WebCore::SimpleLineLayout::RunResolver::Iterator::advance):
1414         (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
1415         
1416             Optimize case where runCount==lineCount. In this case we can just directly jump
1417             to the right run/line.
1418
1419         (WebCore::SimpleLineLayout::RunResolver::begin):
1420         (WebCore::SimpleLineLayout::RunResolver::end):
1421         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
1422         (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
1423         
1424             Get the range corresponding to a rect. This currently cares about y coordinates only.
1425
1426         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator++):
1427         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
1428         (WebCore::SimpleLineLayout::LineResolver::rangeForRect):
1429
1430 2013-11-20  Antoine Quint  <graouts@apple.com>
1431
1432         Cannot animate "points" attribute for <svg:polygon>
1433         https://bugs.webkit.org/show_bug.cgi?id=21371
1434
1435         Reviewed by Antti Koivisto.
1436
1437         Ensure we use animated list of points for SVG <polygon> and <polyline> elements
1438         when we build the path used to draw them, otherwise the animated changes won't
1439         be rendered and the base value will be used.
1440
1441         Tests: svg/animations/polygon-set.svg
1442                svg/animations/polyline-set.svg
1443
1444         * rendering/svg/SVGPathData.cpp:
1445         (WebCore::updatePathFromPolygonElement):
1446         (WebCore::updatePathFromPolylineElement):
1447
1448 2013-11-20  Andrei Bucur  <abucur@adobe.com>
1449
1450         [CSSRegions] Move region styling code into RenderNamedFlowFragment
1451         https://bugs.webkit.org/show_bug.cgi?id=122957
1452
1453         Reviewed by Mihnea Ovidenie.
1454
1455         The patch moves all the region styling functionality outside of RenderRegion
1456         to RenderNamedFlowFragment and outside of RenderFlowThread to RenderNamedFlowThread.
1457         This generates a couple of undesired casts that will be removed in later patches
1458         when everything CSS Regions specific will be located inside RenderNamedFlowThread
1459         and RenderNamedFlowFragment (e.g. the move of the isValid flag, the auto-height
1460         code etc.).
1461
1462         The painting function was also moved from RenderRegion to RenderNamedFlowFragment. It
1463         was only used by the CSS Regions code. The new multi-column implementation has its own
1464         painting mechanism.
1465
1466         Tests: No changed functionality, just refactorings.
1467
1468         * rendering/RenderFlowThread.cpp:
1469         (WebCore::RenderFlowThread::RenderFlowThread):
1470         (WebCore::RenderFlowThread::removeFlowChildInfo):
1471         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
1472         * rendering/RenderFlowThread.h:
1473         * rendering/RenderInline.cpp:
1474         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
1475         * rendering/RenderNamedFlowFragment.cpp:
1476         (WebCore::RenderNamedFlowFragment::RenderNamedFlowFragment):
1477         (WebCore::RenderNamedFlowFragment::styleDidChange):
1478         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
1479         (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
1480         (WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
1481         (WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
1482         (WebCore::RenderNamedFlowFragment::clearObjectStyleInRegion):
1483         (WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
1484         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
1485         (WebCore::shouldPaintRegionContentsInPhase):
1486         (WebCore::RenderNamedFlowFragment::paintObject):
1487         * rendering/RenderNamedFlowFragment.h:
1488         * rendering/RenderNamedFlowThread.cpp:
1489         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
1490         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
1491         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
1492         (WebCore::RenderNamedFlowThread::removeFlowChildInfo):
1493         * rendering/RenderNamedFlowThread.h:
1494         * rendering/RenderRegion.cpp:
1495         (WebCore::RenderRegion::RenderRegion):
1496         (WebCore::RenderRegion::styleDidChange):
1497         (WebCore::RenderRegion::attachRegion):
1498         * rendering/RenderRegion.h:
1499         * rendering/RenderTreeAsText.cpp:
1500         (WebCore::writeRenderRegionList):
1501
1502 2013-11-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1503
1504         Generate toHTMLFooElement() to clean up static_cast<>
1505         https://bugs.webkit.org/show_bug.cgi?id=124571
1506
1507         Reviewed by Darin Adler.
1508
1509         Though there are a lot of clean up commits before, there are still
1510         use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
1511         toHTMLDetails|Meta|Summary|TableSection|TableCaptionElement().
1512
1513         Additionally, other static_cast<> are removed as well.
1514
1515         No new tests, no behavior changes.
1516
1517         * html/HTMLDetailsElement.h:
1518         * html/HTMLMediaElement.cpp:
1519         (HTMLMediaElement::selectNextSourceChild):
1520         * html/HTMLMetaElement.h:
1521         * html/HTMLObjectElement.cpp:
1522         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
1523         * html/HTMLOptionElement.cpp:
1524         (WebCore::HTMLOptionElement::isDisabledFormControl):
1525         * html/HTMLPlugInImageElement.cpp:
1526         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
1527         * html/HTMLSummaryElement.cpp:
1528         (WebCore::HTMLSummaryElement::detailsElement):
1529         * html/HTMLSummaryElement.h:
1530         * html/HTMLTableCaptionElement.h:
1531         * html/HTMLTableElement.cpp:
1532         (WebCore::HTMLTableElement::caption):
1533         (WebCore::HTMLTableElement::tHead):
1534         (WebCore::HTMLTableElement::tFoot):
1535         (WebCore::HTMLTableElement::lastBody):
1536         * html/HTMLTableRowElement.cpp:
1537         (WebCore::HTMLTableRowElement::rowIndex):
1538         * html/HTMLTableSectionElement.h:
1539         * html/HTMLTagNames.in:
1540         * html/MediaDocument.cpp:
1541         (WebCore::MediaDocumentParser::createDocumentStructure):
1542         * html/shadow/DetailsMarkerControl.cpp:
1543         (WebCore::DetailsMarkerControl::summaryElement):
1544         * loader/FrameLoader.cpp:
1545         (WebCore::FrameLoader::handleFallbackContent):
1546         * loader/ImageLoader.cpp:
1547         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
1548         * page/DragController.cpp:
1549         (WebCore::DragController::canProcessDrag):
1550         * page/Frame.cpp:
1551         (WebCore::Frame::searchForLabelsBeforeElement):
1552         * page/SpatialNavigation.cpp:
1553         (WebCore::frameOwnerElement):
1554
1555 2013-11-19  Ryosuke Niwa  <rniwa@webkit.org>
1556
1557         Enable HTMLTemplateElement on Mac port
1558         https://bugs.webkit.org/show_bug.cgi?id=124637
1559
1560         Reviewed by Tim Horton.
1561
1562         Enabled the feature.
1563
1564         * Configurations/FeatureDefines.xcconfig:
1565
1566 2013-11-19  Jinwoo Song  <jinwoo7.song@samsung.com>
1567
1568         Remove unused member function declaration in DocumentOrderedMap.h
1569         https://bugs.webkit.org/show_bug.cgi?id=124629
1570
1571         Reviewed by Ryosuke Niwa.
1572
1573         checkConsistency() is not used anywhere.
1574
1575         * dom/DocumentOrderedMap.h:
1576
1577 2013-11-19  Seokju Kwon  <seokju@webkit.org>
1578
1579         Removal of redundant function call in Editor::insertTextWithoutSendingTextEvent
1580         https://bugs.webkit.org/show_bug.cgi?id=124563
1581
1582         Reviewed by Brent Fulgham.
1583
1584         No new tests needed, no behavior change.
1585
1586         * editing/Editor.cpp:
1587         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1588
1589 2013-11-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1590
1591         Fix build break after r159533.
1592
1593         * CMakeLists.txt: Update ANGLE files.
1594
1595 2013-11-19  Zhuang Zhigang  <zhuangzg@cn.fujitsu.com>
1596
1597         Implement spin control on WinCE port.
1598         https://bugs.webkit.org/show_bug.cgi?id=123254
1599
1600         Reviewed by Brent Fulgham.
1601
1602         * rendering/RenderThemeWinCE.cpp:
1603         (WebCore::RenderThemeWinCE::adjustInnerSpinButtonStyle):
1604         (WebCore::RenderThemeWinCE::paintInnerSpinButton):
1605         * rendering/RenderThemeWinCE.h:
1606
1607 2013-11-19  Roger Fong  <roger_fong@apple.com>
1608
1609         Update ANGLE sources.
1610         https://bugs.webkit.org/show_bug.cgi?id=124615.
1611
1612         Reviewed by Dean Jackson.
1613
1614         Tests covered by Khronos WebGL conformance tests.
1615
1616         * platform/graphics/ANGLEWebKitBridge.cpp: Resolve a build error that resulted from updating ANGLE.
1617         (WebCore::getSymbolInfo):
1618         (WebCore::ANGLEWebKitBridge::compileShaderSource):
1619
1620 2013-11-19  Filip Pizlo  <fpizlo@apple.com>
1621
1622         Rename WatchpointSet::notifyWrite() should be renamed to WatchpointSet::fireAll()
1623         https://bugs.webkit.org/show_bug.cgi?id=124609
1624
1625         Rubber stamped by Mark Lam.
1626
1627         No new tests because no new behavior.
1628
1629         * bindings/scripts/CodeGeneratorJS.pm:
1630         (GenerateHeader):
1631         * bindings/scripts/test/JS/JSTestEventTarget.h:
1632         (WebCore::JSTestEventTarget::create):
1633
1634 2013-11-19  Bear Travis  <betravis@adobe.com>
1635
1636         [CSS Shapes] Parse [<box> || <shape>] values
1637         https://bugs.webkit.org/show_bug.cgi?id=124426
1638
1639         Reviewed by Dirk Schulze.
1640
1641         Shape values can now have an optional box specifying the coordinate sytem to use
1642         for sizing and positioning the shape. This patch adds the functionality to support
1643         parsing these new values.
1644
1645         * css/BasicShapeFunctions.cpp:
1646         (WebCore::valueForBox): Added function to convert between BasicShape::ReferenceBox
1647         and CSSPrimitiveValue (which wraps a CSSValueID).
1648         (WebCore::boxForValue): Ditto.
1649         (WebCore::valueForBasicShape): Translations between CSSBasicShape and BasicShape
1650         must now include the reference box.
1651         (WebCore::basicShapeForValue): Ditto.
1652         * css/BasicShapeFunctions.h:
1653         * css/CSSBasicShapes.cpp:
1654         (WebCore::buildRectangleString): Include the box in the built CSS string.
1655         (WebCore::CSSBasicShapeRectangle::cssText): Ditto.
1656         (WebCore::CSSBasicShapeRectangle::equals): Include the box in comparisions.
1657         (WebCore::buildCircleString):
1658         (WebCore::CSSBasicShapeCircle::cssText):
1659         (WebCore::CSSBasicShapeCircle::equals):
1660         (WebCore::buildEllipseString):
1661         (WebCore::CSSBasicShapeEllipse::cssText):
1662         (WebCore::CSSBasicShapeEllipse::equals):
1663         (WebCore::buildPolygonString):
1664         (WebCore::CSSBasicShapePolygon::cssText):
1665         (WebCore::CSSBasicShapePolygon::equals):
1666         (WebCore::buildInsetRectangleString):
1667         (WebCore::CSSBasicShapeInsetRectangle::cssText):
1668         (WebCore::CSSBasicShapeInsetRectangle::equals):
1669         * css/CSSBasicShapes.h:
1670         (WebCore::CSSBasicShape::box): BasicShapes now have an reference box.
1671         (WebCore::CSSBasicShape::setBox): Ditto.
1672         * css/CSSComputedStyleDeclaration.cpp:
1673         (WebCore::ComputedStyleExtractor::propertyValue): Shape-inside can also
1674         parse the box values.
1675         * css/CSSParser.cpp:
1676         (WebCore::CSSParser::parseValue): The shape properties use parseShapeProperty,
1677         while minor adjustments were made to parseBasicShape's return type.
1678         (WebCore::isBoxValue): Is the CSSValueID one of  the box values.
1679         (WebCore::CSSParser::parseShapeProperty): Parse one of the shape properties
1680         and return an appropriate CSSValue.
1681         (WebCore::CSSParser::parseBasicShape): Return a CSSBasicShape rather than
1682         adding a ShapeValue to the style.
1683         * css/CSSParser.h:
1684         * rendering/style/BasicShapes.h:
1685         (WebCore::BasicShape::box): Add a box to BasicShape and getters/setters.
1686         (WebCore::BasicShape::setBox): Ditto.
1687         (WebCore::BasicShape::BasicShape): Ditto.
1688
1689 2013-11-19  Jer Noble  <jer.noble@apple.com>
1690
1691         [Mac] 9 WebGL conformance failures after r159518.
1692         https://bugs.webkit.org/show_bug.cgi?id=124608
1693
1694         Reviewed by Dean Jackson.
1695
1696         Once we removed the CIImage drawing path, there was no longer any reason to flip the
1697         CGImageRef before drawing to the provided GraphicsContext.
1698
1699         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1700         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1701
1702 2013-11-19  Chris Fleizach  <cfleizach@apple.com>
1703
1704         Web Speech API crashes onboundary event handling with reload
1705         https://bugs.webkit.org/show_bug.cgi?id=124607
1706
1707         Reviewed by Tim Horton.
1708
1709         If the page goes away, we need to cleanup the Mac platform synthesizer object, because
1710         NSSpeechSynthesizer is retained elsewhere to handle the callbacks (so it doesn't automatically
1711         get torn down).
1712
1713         The layout tests for speech rely on a Mock synthesizer, so there is no good way to test this
1714         Mac platform specific behavior.       
1715
1716         * platform/mac/PlatformSpeechSynthesizerMac.mm:
1717         (-[WebSpeechSynthesisWrapper invalidate]):
1718         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
1719
1720 2013-11-19  Mark Lam  <mark.lam@apple.com>
1721
1722         Add tracking of endColumn for Executables.
1723         https://bugs.webkit.org/show_bug.cgi?id=124245.
1724
1725         Reviewed by Geoffrey Garen.
1726
1727         Test: js/dom/script-start-end-locations.html
1728
1729         * ForwardingHeaders/bytecode: Added.
1730         * ForwardingHeaders/bytecode/CodeBlock.h: Added.
1731         * WebCore.exp.in:
1732         * testing/Internals.cpp:
1733         (WebCore::GetCallerCodeBlockFunctor::GetCallerCodeBlockFunctor):
1734         (WebCore::GetCallerCodeBlockFunctor::operator()):
1735         (WebCore::GetCallerCodeBlockFunctor::codeBlock):
1736         (WebCore::Internals::parserMetaData):
1737         * testing/Internals.h:
1738         * testing/Internals.idl:
1739
1740 2013-11-15  Jer Noble  <jer.noble@apple.com>
1741
1742         [MSE] Support fastSeek() in MediaSource.
1743         https://bugs.webkit.org/show_bug.cgi?id=124422
1744
1745         Reviewed by Eric Carlson.
1746
1747         Test: media/media-source/media-source-fastseek.html
1748
1749         * Modules/mediasource/MediaSource.cpp:
1750         * Modules/mediasource/MediaSource.h:
1751
1752         Add support for "seek to the next fastest time" in MediaSource by
1753         returning the time of the nearest Sync sample.
1754
1755         Move the data structure logic out of SourceBuffer and into it's own
1756         class:
1757         * Modules/mediasource/SampleMap.cpp: Added.
1758         (WebCore::SampleIsLessThanMediaTimeComparator::operator()):
1759         (WebCore::SampleIsGreaterThanMediaTimeComparator::operator()):
1760         (WebCore::SampleIsRandomAccess::operator()):
1761         (WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()):
1762         (WebCore::SampleMap::addSample):
1763         (WebCore::SampleMap::removeSample):
1764         (WebCore::SampleMap::findSampleContainingPresentationTime):
1765         (WebCore::SampleMap::findSampleAfterPresentationTime):
1766         (WebCore::SampleMap::findSampleWithDecodeTime):
1767         (WebCore::SampleMap::reverseFindSampleContainingPresentationTime):
1768         (WebCore::SampleMap::reverseFindSampleBeforePresentationTime):
1769         (WebCore::SampleMap::reverseFindSampleWithDecodeTime):
1770         (WebCore::SampleMap::findSyncSamplePriorToPresentationTime):
1771         (WebCore::SampleMap::findSyncSamplePriorToDecodeIterator):
1772         (WebCore::SampleMap::findSyncSampleAfterPresentationTime):
1773         (WebCore::SampleMap::findSyncSampleAfterDecodeIterator):
1774         (WebCore::SampleMap::findSamplesBetweenPresentationTimes):
1775         (WebCore::SampleMap::findDependentSamples):
1776         * Modules/mediasource/SampleMap.h: Added.
1777         (WebCore::SampleMap::presentationBegin):
1778         (WebCore::SampleMap::presentationEnd):
1779         (WebCore::SampleMap::decodeBegin):
1780         (WebCore::SampleMap::decodeEnd):
1781         (WebCore::SampleMap::reversePresentationBegin):
1782         (WebCore::SampleMap::reversePresentationEnd):
1783         (WebCore::SampleMap::reverseDecodeBegin):
1784         (WebCore::SampleMap::reverseDecodeEnd):
1785
1786         Add logic to find and return the time of the next & previous sync
1787         sample, within the threshold provided:
1788         * Modules/mediasource/SourceBuffer.cpp:
1789         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
1790         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
1791         (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
1792         (WebCore::SourceBuffer::appendBufferTimerFired):
1793         (WebCore::SourceBuffer::setActive):
1794         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1795         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
1796         (WebCore::SourceBuffer::provideMediaData):
1797         * Modules/mediasource/SourceBuffer.h:
1798         * platform/graphics/SourceBufferPrivate.h:
1799         (WebCore::SourceBufferPrivate::setActive):
1800         * platform/graphics/SourceBufferPrivateClient.h:
1801         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime):
1802         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime):
1803
1804         Add new files to the project:
1805         * WebCore.xcodeproj/project.pbxproj:
1806
1807         Drive-by fixes in HTMLMediaElement:
1808         * html/HTMLMediaSource.h:
1809         * html/HTMLMediaElement.cpp:
1810         (HTMLMediaElement::finishSeek): Cause the MediaSource to check the ready state of all its buffers.
1811         (HTMLMediaElement::selectNextSourceChild): Pass in whether the source element has a MediaSource URL.
1812
1813         Implement the seekWithTolerance behavior in MockMediaPlayerMediaSource:
1814         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1815         (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble):
1816         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
1817         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
1818         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
1819         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1820         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
1821         (WebCore::MockMediaSourcePrivate::seekToTime):
1822         * platform/mock/mediasource/MockMediaSourcePrivate.h:
1823         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1824         (WebCore::MockMediaSample::flags):
1825         (WebCore::MockSourceBufferPrivate::setActive):
1826         (WebCore::MockSourceBufferPrivate::fastSeekTimeForMediaTime):
1827         (WebCore::MockSourceBufferPrivate::seekToTime):
1828         * platform/mock/mediasource/MockSourceBufferPrivate.h:
1829
1830 2013-11-19  Jer Noble  <jer.noble@apple.com>
1831
1832         [Mac] 10X slower than Chrome when drawing a video into a canvas
1833         https://bugs.webkit.org/show_bug.cgi?id=124599
1834
1835         Reviewed by Dean Jackson.
1836
1837         Improve performance by creating a CGImageRef which directly references the CVPixelBuffer provided
1838         by AVPlayerItemVideoOutput:
1839         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1840         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1841         (WebCore::CVPixelBufferGetBytePointerCallback):
1842         (WebCore::CVPixelBufferReleaseBytePointerCallback):
1843         (WebCore::CVPixelBufferReleaseInfoCallback):
1844         (WebCore::createImageFromPixelBuffer):
1845         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
1846
1847         Additionally, when asked to paint with an AVPlayerItemVideoOutput, block until the output notifies
1848         its delegate that a pixel buffer is available:
1849         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1850         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1851         (WebCore::globalPullDelegateQueue):
1852         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
1853         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
1854         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1855         (WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime):
1856         (WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
1857         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
1858         (-[WebCoreAVFPullDelegate initWithCallback:]):
1859         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
1860         (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
1861         
1862         To further optimize video -> canvas drawing, add a method which can return a PassNativeImage to be
1863         drawn directly onto the canvas, rather than rendering into an intermediary context:
1864         * html/HTMLVideoElement.cpp:
1865         (WebCore::HTMLVideoElement::nativeImageForCurrentTime):
1866         * html/HTMLVideoElement.h:
1867         * html/canvas/CanvasRenderingContext2D.cpp:
1868         (WebCore::CanvasRenderingContext2D::drawImage):
1869         * platform/graphics/MediaPlayer.cpp:
1870         (WebCore::MediaPlayer::nativeImageForCurrentTime):
1871         * platform/graphics/MediaPlayer.h:
1872         * platform/graphics/MediaPlayerPrivate.h:
1873         (WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime):
1874
1875 2013-11-19  Brady Eidson  <beidson@apple.com>
1876
1877         Consolidate IDBBackingStore*Interface and IDBBackingStore*LevelDB
1878         https://bugs.webkit.org/show_bug.cgi?id=124597
1879
1880         Reviewed by Alexey Proskuryakov.
1881
1882         The Interface abstraction doesn’t make sense anymore, as LevelDB will be the only implementor.
1883
1884         * Modules/indexeddb/IDBBackingStoreCursorInterface.h: Removed.
1885         * Modules/indexeddb/IDBBackingStoreInterface.h: Removed.
1886         * Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Removed.
1887
1888         * Modules/indexeddb/IDBServerConnection.h:
1889
1890         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
1891         (WebCore::IDBBackingStoreCursorLevelDB::key):
1892         (WebCore::IDBBackingStoreCursorLevelDB::primaryKey):
1893         (WebCore::IDBBackingStoreCursorLevelDB::recordIdentifier):
1894
1895         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1896         (WebCore::IDBBackingStoreLevelDB::getOrEstablishIDBDatabaseMetadata):
1897         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
1898         (WebCore::IDBBackingStoreLevelDB::deleteDatabase):
1899         (WebCore::IDBBackingStoreLevelDB::createObjectStore):
1900         (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
1901         (WebCore::IDBBackingStoreLevelDB::getRecord):
1902         (WebCore::IDBBackingStoreLevelDB::putRecord):
1903         (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
1904         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
1905         (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
1906         (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
1907         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
1908         (WebCore::IDBBackingStoreLevelDB::createIndex):
1909         (WebCore::IDBBackingStoreLevelDB::deleteIndex):
1910         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
1911         (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
1912         (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
1913         (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
1914         (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
1915         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
1916         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
1917         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
1918         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
1919         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1920
1921         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
1922         (WebCore::IDBBackingStoreTransactionLevelDB::levelDBTransactionFrom):
1923
1924         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp:
1925         (WebCore::IDBIndexWriterLevelDB::writeIndexKeys):
1926         (WebCore::IDBIndexWriterLevelDB::verifyIndexKeys):
1927         (WebCore::IDBIndexWriterLevelDB::addingKeyAllowed):
1928         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h:
1929
1930         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
1931         (WebCore::IDBServerConnectionLevelDB::get):
1932         (WebCore::IDBServerConnectionLevelDB::openCursor):
1933         (WebCore::IDBServerConnectionLevelDB::count):
1934         (WebCore::IDBServerConnectionLevelDB::deleteRange):
1935
1936         * WebCore.xcodeproj/project.pbxproj:
1937
1938 2013-11-19  Sergio Correia  <sergio.correia@openbossa.org>
1939
1940         Get rid of bare new in SVGAnimatedColorAnimator::constructFromString()
1941         https://bugs.webkit.org/show_bug.cgi?id=124595
1942
1943         Reviewed by Darin Adler.
1944
1945         Use std::unique_ptr instead, to manage the arguments passed to the create
1946         methods of SVGAnimatedType.
1947
1948         No new tests, covered by existing tests.
1949
1950         * svg/SVGAnimatedAngle.cpp:
1951         (WebCore::SVGAnimatedAngleAnimator::constructFromString): Replace bare
1952         pointer with std::unique_ptr.
1953         * svg/SVGAnimatedBoolean.cpp:
1954         (WebCore::SVGAnimatedBooleanAnimator::constructFromString): Ditto.
1955         * svg/SVGAnimatedColor.cpp:
1956         (WebCore::SVGAnimatedColorAnimator::constructFromString): Ditto.
1957         * svg/SVGAnimatedEnumeration.cpp:
1958         (WebCore::SVGAnimatedEnumerationAnimator::constructFromString): Ditto.
1959         * svg/SVGAnimatedInteger.cpp:
1960         (WebCore::SVGAnimatedIntegerAnimator::constructFromString): Ditto.
1961         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
1962         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
1963         Ditto.
1964         * svg/SVGAnimatedLength.cpp:
1965         (WebCore::SVGAnimatedLengthAnimator::constructFromString): Ditto.
1966         * svg/SVGAnimatedLengthList.cpp:
1967         (WebCore::SVGAnimatedLengthListAnimator::constructFromString): Ditto.
1968         * svg/SVGAnimatedNumber.cpp:
1969         (WebCore::SVGAnimatedNumberAnimator::constructFromString): Ditto.
1970         * svg/SVGAnimatedNumberList.cpp:
1971         (WebCore::SVGAnimatedNumberListAnimator::constructFromString): Ditto.
1972         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1973         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString):
1974         Ditto.
1975         * svg/SVGAnimatedPointList.cpp:
1976         (WebCore::SVGAnimatedPointListAnimator::constructFromString): Ditto.
1977         * svg/SVGAnimatedPreserveAspectRatio.cpp:
1978         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
1979         Ditto.
1980         * svg/SVGAnimatedRect.cpp:
1981         (WebCore::SVGAnimatedRectAnimator::constructFromString): Ditto.
1982         * svg/SVGAnimatedString.cpp:
1983         (WebCore::SVGAnimatedStringAnimator::constructFromString): Ditto.
1984         * svg/SVGAnimatedTransformList.cpp:
1985         (WebCore::SVGAnimatedTransformListAnimator::constructFromString):
1986         Ditto.
1987         * svg/SVGAnimatedType.cpp:
1988         (WebCore::SVGAnimatedType::createAngleAndEnumeration): Use
1989         std::unique_ptr instead of bare pointer as parameter.
1990         (WebCore::SVGAnimatedType::createBoolean): Ditto.
1991         (WebCore::SVGAnimatedType::createColor): Ditto.
1992         (WebCore::SVGAnimatedType::createEnumeration): Ditto.
1993         (WebCore::SVGAnimatedType::createInteger): Ditto.
1994         (WebCore::SVGAnimatedType::createIntegerOptionalInteger): Ditto.
1995         (WebCore::SVGAnimatedType::createLength): Ditto.
1996         (WebCore::SVGAnimatedType::createLengthList): Ditto.
1997         (WebCore::SVGAnimatedType::createNumber): Ditto.
1998         (WebCore::SVGAnimatedType::createNumberList): Ditto.
1999         (WebCore::SVGAnimatedType::createNumberOptionalNumber): Ditto.
2000         (WebCore::SVGAnimatedType::createPointList): Ditto.
2001         (WebCore::SVGAnimatedType::createPreserveAspectRatio): Ditto.
2002         (WebCore::SVGAnimatedType::createRect): Ditto.
2003         (WebCore::SVGAnimatedType::createString): Ditto.
2004         (WebCore::SVGAnimatedType::createTransformList): Ditto.
2005         * svg/SVGAnimatedType.h: Use std::unique_ptr as parameter in the
2006         create methods.
2007         * svg/SVGAnimatedTypeAnimator.h:
2008         (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue): Make
2009         helper return std::unique_ptr instead of bare pointer.
2010         (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues): Ditto.
2011
2012 2013-11-19  Hans Muller  <hmuller@adobe.com>
2013
2014         [CSS Shapes] Refactor RectangleShape
2015         https://bugs.webkit.org/show_bug.cgi?id=124416
2016
2017         Privatize and rename the FloatRoundedRect class defined in RectangleShape.h.
2018         The new class is called RectangleShape::ShapeBounds. This change enables
2019         creating a proper FloatRoundedRect analog of the existing RoundedRect class;
2020         part of adding support for box shapes, per the latest CSS spec.
2021
2022         Reviewed by Dean Jackson.
2023
2024         No new tests, just refactoring.
2025
2026         * rendering/shapes/RectangleShape.cpp:
2027         (WebCore::RectangleShape::ShapeBounds::paddingBounds):
2028         (WebCore::RectangleShape::ShapeBounds::marginBounds):
2029         (WebCore::RectangleShape::ShapeBounds::cornerInterceptForWidth):
2030         (WebCore::RectangleShape::shapePaddingBounds):
2031         (WebCore::RectangleShape::shapeMarginBounds):
2032         (WebCore::RectangleShape::getExcludedIntervals):
2033         (WebCore::RectangleShape::getIncludedIntervals):
2034         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
2035         * rendering/shapes/RectangleShape.h:
2036         (WebCore::RectangleShape::ShapeBounds::ShapeBounds):
2037         (WebCore::RectangleShape::ShapeBounds::rx):
2038         (WebCore::RectangleShape::ShapeBounds::ry):
2039
2040 2013-11-19  Sergio Correia  <sergio.correia@openbossa.org>
2041
2042         Mark classes deriving from SVGAnimatedTypeAnimator as FINAL
2043         https://bugs.webkit.org/show_bug.cgi?id=124456
2044
2045         Reviewed by Darin Adler.
2046
2047         Also add OVERRIDE to their virtual methods appropriately and remove
2048         existing empty virtual destructors.
2049
2050         No new tests, covered by existing ones.
2051
2052         * svg/SVGAnimatedAngle.h:
2053         * svg/SVGAnimatedBoolean.h:
2054         * svg/SVGAnimatedColor.h:
2055         * svg/SVGAnimatedEnumeration.h:
2056         * svg/SVGAnimatedInteger.h:
2057         * svg/SVGAnimatedIntegerOptionalInteger.h:
2058         * svg/SVGAnimatedLength.h:
2059         * svg/SVGAnimatedLengthList.h:
2060         * svg/SVGAnimatedNumber.h:
2061         * svg/SVGAnimatedNumberList.h:
2062         * svg/SVGAnimatedNumberOptionalNumber.h:
2063         * svg/SVGAnimatedPath.h:
2064         * svg/SVGAnimatedPointList.h:
2065         * svg/SVGAnimatedPreserveAspectRatio.h:
2066         * svg/SVGAnimatedRect.h:
2067         * svg/SVGAnimatedString.h:
2068         * svg/SVGAnimatedTransformList.h:
2069
2070 2013-11-19  Brady Eidson  <beidson@apple.com>
2071
2072         Add WebIDBServerConnection and DatabaseProcessIDBConnection stubs
2073         https://bugs.webkit.org/show_bug.cgi?id=124562
2074
2075         Reviewed by Alexey Proskuryakov.
2076
2077         Export some more symbols and headers for WK2 to use.
2078
2079         * WebCore.exp.in:
2080         * WebCore.xcodeproj/project.pbxproj:
2081
2082 2013-11-19  Frédéric Wang  <fred.wang@free.fr>
2083
2084         Map the dir attribute to the CSS direction property.
2085         https://bugs.webkit.org/show_bug.cgi?id=124572.
2086
2087         Reviewed by Darin Adler.
2088
2089         Tests: mathml/presentation/direction-overall.html
2090                mathml/presentation/direction-token.html
2091                mathml/presentation/direction.html
2092
2093         * mathml/MathMLElement.cpp:
2094         (WebCore::MathMLElement::isPresentationAttribute): add dir
2095         (WebCore::MathMLElement::collectStyleForPresentationAttribute): map dir
2096         * mathml/mathattrs.in: add the dir attribute
2097         * mathml/mathtags.in: add the mstyle tag (needed to use mstyleTag)
2098
2099 2013-11-19  Sergio Correia  <sergio.correia@openbossa.org>
2100
2101         [SVG] Convert OwnPtr/PassOwnPtr to std::unique_ptr
2102         https://bugs.webkit.org/show_bug.cgi?id=124382
2103
2104         Reviewed by Darin Adler.
2105
2106         The files modified are mostly under WebCore/svg/; in a few cases, some
2107         "external" files needed changes as well.
2108
2109         No new tests, covered by existing ones.
2110
2111         * css/CSSFontFaceSource.cpp:
2112         * loader/cache/CachedImage.cpp:
2113         * loader/cache/CachedImage.h:
2114         * platform/graphics/SimpleFontData.cpp:
2115         * platform/graphics/SimpleFontData.h:
2116         * rendering/svg/RenderSVGResourceContainer.cpp:
2117         * svg/SVGAnimateElement.cpp:
2118         * svg/SVGAnimateElement.h:
2119         * svg/SVGAnimatedAngle.cpp:
2120         * svg/SVGAnimatedAngle.h:
2121         * svg/SVGAnimatedBoolean.cpp:
2122         * svg/SVGAnimatedBoolean.h:
2123         * svg/SVGAnimatedColor.cpp:
2124         * svg/SVGAnimatedColor.h:
2125         * svg/SVGAnimatedEnumeration.cpp:
2126         * svg/SVGAnimatedEnumeration.h:
2127         * svg/SVGAnimatedInteger.cpp:
2128         * svg/SVGAnimatedInteger.h:
2129         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
2130         * svg/SVGAnimatedIntegerOptionalInteger.h:
2131         * svg/SVGAnimatedLength.cpp:
2132         * svg/SVGAnimatedLength.h:
2133         * svg/SVGAnimatedLengthList.cpp:
2134         * svg/SVGAnimatedLengthList.h:
2135         * svg/SVGAnimatedNumber.cpp:
2136         * svg/SVGAnimatedNumber.h:
2137         * svg/SVGAnimatedNumberList.cpp:
2138         * svg/SVGAnimatedNumberList.h:
2139         * svg/SVGAnimatedNumberOptionalNumber.cpp:
2140         * svg/SVGAnimatedNumberOptionalNumber.h:
2141         * svg/SVGAnimatedPath.cpp:
2142         * svg/SVGAnimatedPath.h:
2143         * svg/SVGAnimatedPointList.cpp:
2144         * svg/SVGAnimatedPointList.h:
2145         * svg/SVGAnimatedPreserveAspectRatio.cpp:
2146         * svg/SVGAnimatedPreserveAspectRatio.h:
2147         * svg/SVGAnimatedRect.cpp:
2148         * svg/SVGAnimatedRect.h:
2149         * svg/SVGAnimatedString.cpp:
2150         * svg/SVGAnimatedString.h:
2151         * svg/SVGAnimatedTransformList.cpp:
2152         * svg/SVGAnimatedTransformList.h:
2153         * svg/SVGAnimatedType.cpp:
2154         * svg/SVGAnimatedType.h:
2155         * svg/SVGAnimatedTypeAnimator.cpp:
2156         * svg/SVGAnimatedTypeAnimator.h:
2157         * svg/SVGAnimatorFactory.h:
2158         * svg/SVGDocumentExtensions.cpp:
2159         * svg/SVGDocumentExtensions.h:
2160         * svg/SVGFontData.h:
2161         * svg/SVGFontElement.cpp:
2162         * svg/SVGFontElement.h:
2163         * svg/SVGGraphicsElement.cpp:
2164         * svg/SVGGraphicsElement.h:
2165         * svg/SVGPathByteStreamSource.h:
2166         * svg/SVGPathParser.h:
2167         * svg/SVGPathSegListSource.h:
2168         * svg/SVGPathStringSource.h:
2169         * svg/SVGPathUtilities.cpp:
2170         * svg/SVGPathUtilities.h:
2171         * svg/animation/SMILTimeContainer.cpp:
2172         * svg/animation/SMILTimeContainer.h:
2173         * svg/graphics/SVGImage.cpp:
2174         * svg/graphics/SVGImage.h:
2175         * svg/graphics/SVGImageCache.h:
2176         * svg/properties/SVGAttributeToPropertyMap.cpp:
2177         * svg/properties/SVGAttributeToPropertyMap.h:
2178
2179 2013-11-19  Zoltan Horvath  <zoltan@webkit.org>
2180
2181         Add LineInlineHeaders.h to WebCore.xcodeproj
2182         <https://webkit.org/b/124460>
2183
2184         Reviewed by Csaba Osztrogonác.
2185
2186         LineInlineHeaders.h (r159354) hasn't been added to WebCore.xcodeproj. This patch adds to it.
2187
2188         No new tests, no behavior change.
2189
2190         * WebCore.xcodeproj/project.pbxproj:
2191
2192 2013-11-19  Krzysztof Czech  <k.czech@samsung.com>
2193
2194         [AX] Use std::unique_ptr to manage AXComputedObjectAttributeCache
2195         https://bugs.webkit.org/show_bug.cgi?id=124404
2196
2197         Reviewed by Mario Sanchez Prada.
2198
2199         Convert OwnPtr/PassOwnPtr to std::unique_ptr.
2200
2201         * accessibility/AXObjectCache.cpp:
2202         (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates):
2203         (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
2204         * accessibility/AXObjectCache.h:
2205         (WebCore::AXComputedObjectAttributeCache::AXComputedObjectAttributeCache):
2206
2207 2013-11-19  Ryosuke Niwa  <rniwa@webkit.org>
2208
2209         Add more assertions with security implications in DocumentOrderedMap
2210         https://bugs.webkit.org/show_bug.cgi?id=124559
2211
2212         Reviewed by Antti Koivisto.
2213
2214         Assert that newly added elements and existing elements in the document ordered map are in the same tree scope
2215         as the document ordered map. Also exit early if we're about to add an element in a wrong document to the map.
2216         We don't exit early in get() because the damage has already been done at that point (the element may have been
2217         deleted already).
2218
2219         * dom/Document.cpp:
2220         (WebCore::Document::addImageElementByLowercasedUsemap):
2221         * dom/DocumentOrderedMap.cpp:
2222         (WebCore::DocumentOrderedMap::add): Assert that the newly added element is in the current tree scope.
2223         Also exit early if either the element is not in the tree scope or not in the right document.
2224         While this doesn't make the function completely fault safe, it'll catch when we try to add a detached node.
2225         (WebCore::DocumentOrderedMap::remove): Convert existing assertions to ones with security implication.
2226         (WebCore::DocumentOrderedMap::get): Assert with security implication that the element we're about to return
2227         is in the current tree scope. The element may have already been deleted if we ever hit these assertions.
2228         (WebCore::DocumentOrderedMap::getAllElementsById):  Convert an existing assertion to an assertion with security
2229         implication.
2230         * dom/DocumentOrderedMap.h:
2231         * dom/TreeScope.cpp:
2232         (WebCore::TreeScope::addElementById):
2233         (WebCore::TreeScope::addElementByName):
2234         (WebCore::TreeScope::addImageMap):
2235         (WebCore::TreeScope::addLabel):
2236         * html/HTMLDocument.cpp:
2237         (WebCore::HTMLDocument::addDocumentNamedItem):
2238         (WebCore::HTMLDocument::addWindowNamedItem):
2239         * html/HTMLImageElement.cpp:
2240         (WebCore::HTMLImageElement::insertedInto): Set InTreeScope flag before calling addImageElementByLowercasedUsemap.
2241         * html/HTMLMapElement.cpp:
2242         (WebCore::HTMLMapElement::insertedInto): Ditto for addImageMap.
2243
2244 2013-11-18  Commit Queue  <commit-queue@webkit.org>
2245
2246         Unreviewed, rolling out r159455.
2247         http://trac.webkit.org/changeset/159455
2248         https://bugs.webkit.org/show_bug.cgi?id=124568
2249
2250         broke two api tests (see bug 124564) (Requested by thorton on
2251         #webkit).
2252
2253         * CMakeLists.txt:
2254         * GNUmakefile.list.am:
2255         * WebCore.exp.in:
2256         * WebCore.vcxproj/WebCore.vcxproj:
2257         * WebCore.vcxproj/WebCore.vcxproj.filters:
2258         * WebCore.xcodeproj/project.pbxproj:
2259         * bindings/objc/DOM.mm:
2260         (-[DOMNode renderedImage]):
2261         (-[DOMRange renderedImageForcingBlackText:]):
2262         * dom/Clipboard.cpp:
2263         (WebCore::Clipboard::createDragImage):
2264         * dom/ClipboardMac.mm:
2265         (WebCore::Clipboard::createDragImage):
2266         * page/DragController.cpp:
2267         (WebCore::DragController::startDrag):
2268         * page/Frame.cpp:
2269         (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
2270         (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
2271         (WebCore::Frame::nodeImage):
2272         (WebCore::Frame::dragImageForSelection):
2273         * page/Frame.h:
2274         * page/FrameSnapshotting.cpp: Removed.
2275         * page/FrameSnapshotting.h: Removed.
2276         * page/mac/FrameMac.mm: Copied from Source/WebCore/page/win/FrameWin.h.
2277         (WebCore::Frame::nodeImage):
2278         (WebCore::Frame::dragImageForSelection):
2279         * page/mac/FrameSnapshottingMac.h: Copied from Source/WebCore/page/win/FrameWin.h.
2280         * page/mac/FrameSnapshottingMac.mm: Added.
2281         (WebCore::imageFromRect):
2282         (WebCore::selectionImage):
2283         (WebCore::rangeImage):
2284         (WebCore::snapshotDragImage):
2285         * page/win/FrameWin.cpp:
2286         (WebCore::Frame::dragImageForSelection):
2287         (WebCore::Frame::nodeImage):
2288         * page/win/FrameWin.h:
2289         * platform/DragImage.cpp:
2290         (WebCore::fitDragImageToMaxSize):
2291         (WebCore::createDragImageForLink):
2292         * platform/DragImage.h:
2293
2294 2013-11-18  Mark Rowe  <mrowe@apple.com>
2295
2296         Use hw.activecpu for determining how many processes to spawn.
2297
2298         It's documented as the preferred way to determine the number of threads
2299         or processes to create in a SMP aware application.
2300
2301         Rubber-stamped by Tim Horton.
2302
2303         * WebCore.xcodeproj/project.pbxproj:
2304
2305 2013-11-18  Samuel White  <samuel_white@apple.com>
2306
2307         AX: aria-labelledby should be used in preference to aria-labeledby
2308         https://bugs.webkit.org/show_bug.cgi?id=62351
2309
2310         Reviewed by Chris Fleizach.
2311
2312         Making sure aria-labelled by overrides the incorrectly spelled aria-labeledby attribute.
2313
2314         Test: accessibility/aria-labelledby-overrides-aria-labeledby.html
2315
2316         * accessibility/AccessibilityNodeObject.cpp:
2317         (WebCore::AccessibilityNodeObject::ariaLabeledByElements):
2318
2319 2013-11-18  Zalan Bujtas  <zalan@apple.com>
2320
2321         use after free in WebCore::DocumentOrderedMap::remove / WebCore::TreeScope::removeElementById
2322         https://bugs.webkit.org/show_bug.cgi?id=121324
2323
2324         Reviewed by Ryosuke Niwa.
2325
2326         Update the document ordered map for an image element before dispatching load or error events
2327         when it's inserted into a document.
2328
2329         Test: fast/dom/modify-node-and-while-in-the-callback-too-crash.html
2330
2331         * dom/DocumentOrderedMap.cpp: defensive fix to avoid use after free issues.
2332         (WebCore::DocumentOrderedMap::remove):
2333         * html/HTMLImageElement.cpp:
2334         (WebCore::HTMLImageElement::insertedInto):
2335         * loader/ImageLoader.cpp:
2336         (WebCore::ImageLoader::updateFromElement): setting m_failedLoadURL makes
2337         repeated updateFromElement calls return early.
2338
2339 2013-11-18  Benjamin Poulain  <bpoulain@apple.com>
2340
2341         Upstream iOS's ResourceHandle implementation
2342         https://bugs.webkit.org/show_bug.cgi?id=124554
2343
2344         Reviewed by Sam Weinig.
2345
2346         * platform/network/ResourceHandle.h:
2347         (WebCore::ResourceHandle::quickLookHandle):
2348         (WebCore::ResourceHandle::setQuickLookHandle):
2349         * platform/network/ResourceHandleClient.h:
2350         (WebCore::ResourceHandleClient::connectionProperties):
2351         (WebCore::ResourceHandleClient::shouldCacheResponse):
2352         * platform/network/ResourceHandleInternal.h:
2353         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2354         * platform/network/cf/ResourceHandleCFNet.cpp:
2355         (WebCore::synthesizeRedirectResponseIfNecessary):
2356         (WebCore::willSendRequest):
2357         (WebCore::didReceiveResponse):
2358         (WebCore::didReceiveDataArray):
2359         (WebCore::didReceiveData):
2360         (WebCore::didFinishLoading):
2361         (WebCore::didFail):
2362         (WebCore::willCacheResponse):
2363         (WebCore::canRespondToProtectionSpace):
2364         (WebCore::ResourceHandle::createCFURLConnection):
2365         (WebCore::ResourceHandle::start):
2366         (WebCore::ResourceHandle::willSendRequest):
2367         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
2368         (WebCore::ResourceHandle::currentRequest):
2369         (WebCore::ResourceHandle::connectionClientCallbacks):
2370
2371 2013-11-18  Commit Queue  <commit-queue@webkit.org>
2372
2373         Unreviewed, rolling out r159430.
2374         http://trac.webkit.org/changeset/159430
2375         https://bugs.webkit.org/show_bug.cgi?id=124548
2376
2377         WebCore can know nothing about nor use files from WebKit/
2378         (Requested by thorton on #webkit).
2379
2380         * DerivedSources.make:
2381
2382 2013-11-18  Brady Eidson  <beidson@apple.com>
2383
2384         Remove IDBServerConnection's deprecatedBackingStore()
2385         https://bugs.webkit.org/show_bug.cgi?id=124547
2386
2387         Reviewed by Tim Horton.
2388
2389         It is no longer needed, as the front end no longer knows about the backing store.
2390
2391         * Modules/indexeddb/IDBServerConnection.h:
2392
2393         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2394         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2395
2396 2013-11-18  Samuel White  <samuel_white@apple.com>
2397
2398         AX: Add ability to fetch only visible table rows.
2399         https://bugs.webkit.org/show_bug.cgi?id=124430
2400
2401         Reviewed by Chris Fleizach.
2402
2403         Adding AccessibilityTable::visibleRows method to support AXVisibleRows attribute mac platform.
2404
2405         Test: platform/mac/accessibility/table-visible-rows.html
2406
2407         * accessibility/AccessibilityTable.cpp:
2408         (WebCore::AccessibilityTable::columnHeaders):
2409         (WebCore::AccessibilityTable::rowHeaders):
2410         (WebCore::AccessibilityTable::visibleRows):
2411         * accessibility/AccessibilityTable.h:
2412         * accessibility/AccessibilityTableRow.h:
2413         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2414         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2415
2416 2013-11-18  Simon Fraser  <simon.fraser@apple.com>
2417
2418         At some scales, opaque compositing layers have garbage pixels around the edges
2419         https://bugs.webkit.org/show_bug.cgi?id=124541
2420
2421         Reviewed by Dean Jackson.
2422         
2423         Layers get marked as having opaque contents when their background is
2424         known to paint the entire layer. However, this failed to take into
2425         account two reasons why every pixel may not get painted.
2426         
2427         First, subpixel layout can result in non-integral RenderLayer
2428         bounds, which will get rounded up to an integral GraphicsLayer
2429         size. When this happens we may not paint edge pixels.
2430         
2431         Second, at non-integral scale factors, graphics context scaling
2432         may cause us to not paint edge pixels.
2433         
2434         Fix by only marking PlatformCALayers as having opaque contents
2435         when the contentsScale of the layer is integral.
2436
2437         Not testable, because we can't guarantee to get garbage pixels
2438         in a ref test, and layer dumps show GraphicsLayer's notion of
2439         content opaqueness, not the one we set on the PlatformCALayer.
2440
2441         * platform/graphics/ca/GraphicsLayerCA.cpp:
2442         (WebCore::isIntegral):
2443         (WebCore::clampedContentsScaleForScale):
2444         (WebCore::GraphicsLayerCA::updateRootRelativeScale):
2445         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2446         (WebCore::GraphicsLayerCA::updateContentsOpaque):
2447         (WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact):
2448         Drive-by typo fix.
2449         (WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties):
2450         * platform/graphics/ca/GraphicsLayerCA.h:
2451         * rendering/RenderLayerBacking.cpp:
2452         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2453
2454 2013-11-18  David Hyatt  <hyatt@apple.com>
2455
2456         Add a quirk to not respect center text-align when positioning
2457
2458         <rdar://problem/15427571>
2459         https://bugs.webkit.org/show_bug.cgi?id=124522
2460
2461         Reviewed by Simon Fraser.
2462
2463         Added fast/block/legacy-text-align-position-quirk.html
2464
2465         * page/Settings.in:
2466         Add the quirk setting.
2467
2468         * rendering/RenderBlockLineLayout.cpp:
2469         (WebCore::RenderBlock::startAlignedOffsetForLine):
2470         Don't pay attention to center text-align when the quirk is set.
2471
2472 2013-11-18  Brian J. Burg  <burg@cs.washington.edu>
2473
2474         Consolidate various frame snapshot capabilities.
2475         https://bugs.webkit.org/show_bug.cgi?id=124325
2476
2477         Reviewed by Timothy Hatcher.
2478
2479         Various snapshot creation methods had duplicated code and were split
2480         between Frame, DragImage, and platform-specific implementationss.
2481         This patch puts WebCore snapshot methods into FrameSnapshotting
2482         and removes platform implementations where possible.
2483
2484         DragImage methods reuse snapshot methods where possible. Inspector
2485         will be able to take snapshots without using drag images.
2486
2487         No new tests, this is a refactoring.
2488
2489         * CMakeLists.txt:
2490         * GNUmakefile.list.am:
2491         * WebCore.exp.in:
2492         * WebCore.vcxproj/WebCore.vcxproj:
2493         * WebCore.vcxproj/WebCore.vcxproj.filters:
2494         * WebCore.xcodeproj/project.pbxproj:
2495         * bindings/objc/DOM.mm:
2496         (-[DOMNode renderedImage]):
2497         (-[DOMRange renderedImageForcingBlackText:]):
2498         * dom/Clipboard.cpp:
2499         (WebCore::Clipboard::createDragImage):
2500         * dom/ClipboardMac.mm:
2501         (WebCore::Clipboard::createDragImage):
2502         * page/DragController.cpp:
2503         (WebCore::DragController::startDrag):
2504         * page/Frame.cpp:
2505         * page/Frame.h:
2506         * page/FrameSnapshotting.cpp: Added.
2507         (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
2508         (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
2509         (WebCore::snapshotFrameRect): Move most buffer logic to here.
2510         (WebCore::snapshotSelection): Moved from Frame.
2511         (WebCore::snapshotNode): Moved from Frame.
2512         * page/FrameSnapshotting.h: Added.
2513         * page/mac/FrameMac.mm: Removed.
2514         * page/mac/FrameSnapshottingMac.h: Removed.
2515         * page/mac/FrameSnapshottingMac.mm: Removed.
2516         * page/win/FrameWin.cpp: remove duplicate implementation.
2517         * page/win/FrameWin.h: Fix an incorrect parameter name.
2518         * platform/DragImage.cpp:
2519         (WebCore::ScopedNodeDragState::ScopedNodeDragState):
2520         (WebCore::ScopedNodeDragState::~ScopedNodeDragState):
2521         (WebCore::createDragImageFromSnapshot): Boilerplate buffer conversion.
2522         (WebCore::createDragImageForNode):
2523         (WebCore::createDragImageForSelection):
2524         (WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
2525         (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
2526         (WebCore::createDragImageForRange): Moved from Frame.
2527         (WebCore::createDragImageForImage): Moved from FrameSnapshottingMac.
2528         (WebCore::createDragImageForLink): use nullptr.
2529
2530 2013-11-18  Brendan Long  <b.long@cablelabs.com>
2531
2532         [GStreamer] Crash when using media source
2533         https://bugs.webkit.org/show_bug.cgi?id=124525
2534
2535         Reviewed by Philippe Normand.
2536
2537         No new tests because this is already covered by tests in media/media-source (which aren't enabled because the feature isn't done).
2538
2539         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
2540         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): Add missing adoptRef()
2541
2542 2013-11-18  Brady Eidson  <beidson@apple.com>
2543
2544         Remove unneeded BackingStore-related #include from IDBFactoryBackendInterface
2545
2546         Rubberstamped by Beth Dakin.
2547
2548         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2549
2550 2013-11-18  Nick Diego Yamane  <nick.yamane@openbossa.org>
2551
2552         Change mediasource and mediastream modules to use nullptr
2553         https://bugs.webkit.org/show_bug.cgi?id=124530
2554
2555         Reviewed by Tim Horton.
2556
2557         No new tests needed, no behavior change.
2558
2559         * Modules/mediasource/MediaSource.cpp:
2560         * Modules/mediasource/SourceBuffer.cpp:
2561         * Modules/mediastream/MediaStream.cpp:
2562         * Modules/mediastream/RTCDTMFSender.cpp:
2563         * Modules/mediastream/RTCDataChannel.cpp:
2564         * Modules/mediastream/RTCIceCandidate.cpp:
2565         * Modules/mediastream/RTCPeerConnection.cpp:
2566         * Modules/mediastream/RTCSessionDescription.cpp:
2567         * Modules/mediastream/RTCStatsResponse.cpp:
2568         * Modules/mediastream/UserMediaRequest.cpp:
2569
2570 2013-11-18  Brady Eidson  <beidson@apple.com>
2571
2572         Move execution of IDBCursorBackendOperations to the IDBServerConnection
2573         https://bugs.webkit.org/show_bug.cgi?id=124463
2574
2575         Reviewed by Tim Horton.
2576
2577         This almost entirely removes knowledge of the backing store from the front end.
2578
2579         The primary change here is to give cursors a unique ID.
2580
2581         This way the IDBCursorBackend can reference itself by ID, while the 
2582         IDBServerConnection can handle mapping that ID to a backing store.
2583
2584         * Modules/indexeddb/IDBBackingStoreCursorInterface.h:
2585
2586         * Modules/indexeddb/IDBBackingStoreInterface.h:
2587
2588         * Modules/indexeddb/IDBCursorBackend.cpp:
2589         (WebCore::IDBCursorBackend::IDBCursorBackend):
2590         (WebCore::IDBCursorBackend::deleteFunction):
2591         (WebCore::IDBCursorBackend::prefetchReset):
2592         (WebCore::IDBCursorBackend::close):
2593         (WebCore::IDBCursorBackend::updateCursorData):
2594         (WebCore::IDBCursorBackend::clearCursorData):
2595         * Modules/indexeddb/IDBCursorBackend.h:
2596         (WebCore::IDBCursorBackend::create):
2597         (WebCore::IDBCursorBackend::key):
2598         (WebCore::IDBCursorBackend::primaryKey):
2599         (WebCore::IDBCursorBackend::value):
2600         (WebCore::IDBCursorBackend::id):
2601         (WebCore::IDBCursorBackend::transaction):
2602         (WebCore::IDBCursorBackend::setSavedCursorID):
2603
2604         * Modules/indexeddb/IDBCursorBackendOperations.cpp:
2605         (WebCore::CursorAdvanceOperation::perform):
2606         (WebCore::CursorIterationOperation::perform):
2607         (WebCore::CursorPrefetchIterationOperation::perform):
2608         * Modules/indexeddb/IDBCursorBackendOperations.h:
2609         (WebCore::CursorIterationOperation::key):
2610         (WebCore::CursorIterationOperation::callbacks):
2611         (WebCore::CursorAdvanceOperation::count):
2612         (WebCore::CursorAdvanceOperation::callbacks):
2613         (WebCore::CursorPrefetchIterationOperation::numberToFetch):
2614         (WebCore::CursorPrefetchIterationOperation::callbacks):
2615
2616         * Modules/indexeddb/IDBServerConnection.h:
2617
2618         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
2619         (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
2620
2621         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2622         (WebCore::ObjectStoreKeyCursorImpl::create):
2623         (WebCore::ObjectStoreKeyCursorImpl::clone):
2624         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
2625         (WebCore::ObjectStoreCursorImpl::create):
2626         (WebCore::ObjectStoreCursorImpl::clone):
2627         (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
2628         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
2629         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
2630         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
2631         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
2632         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2633
2634         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2635         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
2636         (WebCore::IDBServerConnectionLevelDB::setIndexKeys):
2637         (WebCore::IDBServerConnectionLevelDB::createObjectStore):
2638         (WebCore::IDBServerConnectionLevelDB::createIndex):
2639         (WebCore::IDBServerConnectionLevelDB::deleteIndex):
2640         (WebCore::IDBServerConnectionLevelDB::get):
2641         (WebCore::IDBServerConnectionLevelDB::put):
2642         (WebCore::IDBServerConnectionLevelDB::openCursor):
2643         (WebCore::IDBServerConnectionLevelDB::count):
2644         (WebCore::IDBServerConnectionLevelDB::deleteRange):
2645         (WebCore::IDBServerConnectionLevelDB::clearObjectStore):
2646         (WebCore::IDBServerConnectionLevelDB::deleteObjectStore):
2647         (WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion):
2648         (WebCore::IDBServerConnectionLevelDB::cursorAdvance):
2649         (WebCore::IDBServerConnectionLevelDB::cursorIterate):
2650         (WebCore::IDBServerConnectionLevelDB::cursorPrefetchIteration):
2651         (WebCore::IDBServerConnectionLevelDB::cursorPrefetchReset):
2652         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2653
2654 2013-11-17  Jer Noble  <jer.noble@apple.com>
2655
2656         [WTF] Media time should not have a constructor which accepts a single int or float.
2657         https://bugs.webkit.org/show_bug.cgi?id=124470
2658
2659         Reviewed by Eric Carlson.
2660
2661         Fix the compile error exposed by removing the default parameter in the MediaTime constructor.
2662
2663         * Modules/mediasource/SourceBuffer.cpp:
2664         (WebCore::SourceBuffer::setTimestampOffset):
2665
2666 2013-11-18  Nick Diego Yamane  <nick.yamane@openbossa.org>
2667
2668         Change webaudio to use nullptr for null pointers
2669         https://bugs.webkit.org/show_bug.cgi?id=124526
2670
2671         Reviewed by Anders Carlsson.
2672
2673         No new tests needed, no behavior change.
2674
2675         * Modules/webaudio/AudioBuffer.cpp:
2676         * Modules/webaudio/AudioContext.cpp:
2677         * Modules/webaudio/AudioNode.cpp:
2678         * Modules/webaudio/ChannelMergerNode.cpp:
2679         * Modules/webaudio/ChannelSplitterNode.cpp:
2680         * Modules/webaudio/MediaStreamAudioSource.cpp:
2681         * Modules/webaudio/OfflineAudioContext.cpp:
2682         * Modules/webaudio/PeriodicWave.cpp:
2683         * Modules/webaudio/ScriptProcessorNode.cpp:
2684
2685 2013-11-18  peavo@outlook.com  <peavo@outlook.com>
2686
2687         [Curl] Basic authentication is not reused.
2688         https://bugs.webkit.org/show_bug.cgi?id=124452
2689
2690         Reviewed by Brent Fulgham.
2691
2692         After a successful basic authentication, the credentials are not reused for later requests.
2693         In the CFNetwork port, this is solved by trying basic authentication first, if credentials exists.
2694         Also, when a 401 response is received, the first thing the CFNetwork port does, is to use
2695         m_user/m_pass as credentials in the following request if they are set.
2696         This can be done the same way for the Curl version.
2697
2698         * platform/network/curl/ResourceHandleCurl.cpp:
2699         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Try using m_user/m_pass as credentials first, if they are set.
2700         * platform/network/curl/ResourceHandleManager.cpp:
2701         (WebCore::ResourceHandleManager::applyAuthenticationToRequest): Try basic authentication first, if credentials exists.
2702
2703 2013-11-18  Mátyás Mustoha  <mmatyas@inf.u-szeged.hu>
2704
2705         [curl] Add file cache
2706         https://bugs.webkit.org/show_bug.cgi?id=123333
2707
2708         Reviewed by Brent Fulgham.
2709
2710         Implementation of on disc file cache
2711         for the curl network backend.
2712
2713         * WebCore.vcxproj/WebCore.vcxproj:
2714         * WebCore.vcxproj/WebCore.vcxproj.filters:
2715         * platform/network/curl/CurlCacheEntry.cpp: Added.
2716         (WebCore::CurlCacheEntry::CurlCacheEntry):
2717         (WebCore::CurlCacheEntry::~CurlCacheEntry):
2718         (WebCore::CurlCacheEntry::isCached):
2719         (WebCore::CurlCacheEntry::requestHeaders):
2720         (WebCore::CurlCacheEntry::saveCachedData):
2721         (WebCore::CurlCacheEntry::loadCachedData):
2722         (WebCore::CurlCacheEntry::saveResponseHeaders):
2723         (WebCore::CurlCacheEntry::loadResponseHeaders):
2724         (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
2725         (WebCore::CurlCacheEntry::didFail):
2726         (WebCore::CurlCacheEntry::didFinishLoading):
2727         (WebCore::CurlCacheEntry::generateBaseFilename):
2728         (WebCore::CurlCacheEntry::loadFileToBuffer):
2729         (WebCore::CurlCacheEntry::invalidate):
2730         (WebCore::CurlCacheEntry::parseResponseHeaders):
2731         * platform/network/curl/CurlCacheEntry.h: Added.
2732         (WebCore::CurlCacheEntry::isInMemory):
2733         * platform/network/curl/CurlCacheManager.cpp: Added.
2734         (WebCore::CurlCacheManager::getInstance):
2735         (WebCore::CurlCacheManager::CurlCacheManager):
2736         (WebCore::CurlCacheManager::~CurlCacheManager):
2737         (WebCore::CurlCacheManager::setCacheDirectory):
2738         (WebCore::CurlCacheManager::loadIndex):
2739         (WebCore::CurlCacheManager::saveIndex):
2740         (WebCore::CurlCacheManager::didReceiveResponse):
2741         (WebCore::CurlCacheManager::didFinishLoading):
2742         (WebCore::CurlCacheManager::isCached):
2743         (WebCore::CurlCacheManager::requestHeaders):
2744         (WebCore::CurlCacheManager::didReceiveData):
2745         (WebCore::CurlCacheManager::saveResponseHeaders):
2746         (WebCore::CurlCacheManager::invalidateCacheEntry):
2747         (WebCore::CurlCacheManager::didFail):
2748         (WebCore::CurlCacheManager::loadCachedData):
2749         * platform/network/curl/CurlCacheManager.h: Added.
2750         (WebCore::CurlCacheManager::getCacheDirectory):
2751         * platform/network/curl/ResourceHandleManager.cpp:
2752         (WebCore::writeCallback):
2753         (WebCore::headerCallback):
2754         (WebCore::ResourceHandleManager::downloadTimerCallback):
2755         (WebCore::ResourceHandleManager::initializeHandle):
2756
2757 2013-11-18  peavo@outlook.com  <peavo@outlook.com>
2758
2759         [Win] WebKit version in user agent string is incorrect.
2760         https://bugs.webkit.org/show_bug.cgi?id=124454
2761
2762         Reviewed by Brent Fulgham.
2763
2764         * DerivedSources.make: Generate WebKitVersion.h
2765
2766 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2767
2768         Unreviewed. Fix make distcheck.
2769
2770         * GNUmakefile.am: Add inspector json files to EXTRA_DIST and
2771         remove maketokenizer from EXTRA_DIST.
2772         * GNUmakefile.list.am: Add missing header files.
2773
2774 2013-11-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2775
2776         Generate toHTMLDataList|Html|EmbedElement
2777         https://bugs.webkit.org/show_bug.cgi?id=124482
2778
2779         Reviewed by Tim Horton.
2780
2781         To clean up static_cast<HTMLFoo*>, toHTMLEmbedElement, toHTMLHtmlElement, toHTMLDataListElement
2782         are generated.
2783
2784         No new tests, no behavior changes.
2785
2786         * html/HTMLDataListElement.h:
2787         * html/HTMLEmbedElement.h:
2788         * html/HTMLHtmlElement.h:
2789         * html/HTMLInputElement.cpp:
2790         (WebCore::HTMLInputElement::dataList):
2791         * html/HTMLOptionElement.cpp:
2792         (WebCore::HTMLOptionElement::ownerDataListElement):
2793         * html/HTMLTagNames.in:
2794         * html/ImageDocument.cpp:
2795         (WebCore::ImageDocument::createDocumentStructure):
2796         * html/MediaDocument.cpp:
2797         (WebCore::MediaDocumentParser::createDocumentStructure):
2798         (WebCore::MediaDocument::replaceMediaElementTimerFired):
2799         * html/PluginDocument.cpp:
2800         (WebCore::PluginDocumentParser::createDocumentStructure):
2801         * rendering/RenderTheme.cpp:
2802         (WebCore::RenderTheme::paintSliderTicks):
2803         * xml/parser/XMLDocumentParserLibxml2.cpp:
2804         (WebCore::XMLDocumentParser::startElementNs):
2805
2806 2013-11-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2807
2808         Clean up static_cast<HTMLFoo*> usage
2809         https://bugs.webkit.org/show_bug.cgi?id=124480
2810
2811         Reviewed by Tim Horton.
2812
2813         Though there are toHTMLFoo(), some places are still using static_cast<>.
2814         Additionally, toHTMLBodyElement() is supported from now.
2815
2816         No new tests, no behavior changes.
2817
2818         * accessibility/AccessibilityNodeObject.cpp:
2819         (WebCore::AccessibilityNodeObject::isRequired):
2820         * accessibility/AccessibilityTable.cpp:
2821         (WebCore::AccessibilityTable::isDataTable):
2822         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
2823         (WebCore::JSHTMLFrameSetElement::nameGetter):
2824         * bindings/js/JSPluginElementFunctions.cpp:
2825         (WebCore::pluginInstance):
2826         * dom/Document.cpp:
2827         (WebCore::Document::openSearchDescriptionURL):
2828         (WebCore::Document::iconURLs):
2829         * dom/DocumentStyleSheetCollection.cpp:
2830         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
2831         * editing/ReplaceSelectionCommand.cpp:
2832         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
2833         * editing/ios/EditorIOS.mm:
2834         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
2835         * html/HTMLBodyElement.h:
2836         * html/HTMLDocument.cpp:
2837         (WebCore::HTMLDocument::bgColor):
2838         (WebCore::HTMLDocument::setBgColor):
2839         (WebCore::HTMLDocument::fgColor):
2840         (WebCore::HTMLDocument::setFgColor):
2841         (WebCore::HTMLDocument::alinkColor):
2842         (WebCore::HTMLDocument::setAlinkColor):
2843         (WebCore::HTMLDocument::linkColor):
2844         (WebCore::HTMLDocument::setLinkColor):
2845         (WebCore::HTMLDocument::vlinkColor):
2846         (WebCore::HTMLDocument::setVlinkColor):
2847         * html/HTMLEmbedElement.cpp:
2848         (WebCore::HTMLEmbedElement::rendererIsNeeded):
2849         * html/HTMLFormControlElement.cpp:
2850         (WebCore::HTMLFormControlElement::updateAncestorDisabledState):
2851         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
2852         * html/HTMLFormElement.cpp:
2853         (WebCore::submitElementFromEvent):
2854         * html/HTMLImageLoader.cpp:
2855         (WebCore::HTMLImageLoader::notifyFinished):
2856         * html/HTMLLegendElement.cpp:
2857         (WebCore::HTMLLegendElement::virtualForm):
2858         * html/RadioNodeList.cpp:
2859         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
2860         * inspector/InspectorDOMAgent.cpp:
2861         (WebCore::InspectorDOMAgent::buildObjectForNode):
2862
2863 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2864
2865         Unreviewed. Update GObject DOM symbols file after r158760.
2866
2867         * bindings/gobject/webkitdom.symbols: Add
2868         webkit_dom_text_track_get_id prototype.
2869
2870 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2871
2872         REGRESSION(r158821): [GTK] API break due to removed properties in GObject DOM bindings
2873         https://bugs.webkit.org/show_bug.cgi?id=124489
2874
2875         Reviewed by Philippe Normand.
2876
2877         In r158821, several properties were changed from readonly to
2878         CustomSetter. The GObject DOM bindings currently skips any
2879         attribute having a custom getter or setter, and those properties
2880         are not generated anymore. We should add support for generating
2881         attributes having a custom getter or setter in GObject DOM
2882         bindings generator, but to fix the ABI break now we bring the old
2883         implementatiom back as custom implementation. This fixes the ABI
2884         compatibility, but not the API since the GObject properties are
2885         not generated.
2886
2887         * bindings/gobject/WebKitDOMCustom.cpp:
2888         (webkit_dom_audio_track_get_kind):
2889         (webkit_dom_audio_track_get_language):
2890         (webkit_dom_text_track_get_kind):
2891         (webkit_dom_text_track_get_language):
2892         (webkit_dom_video_track_get_kind):
2893         (webkit_dom_video_track_get_language):
2894         * bindings/gobject/WebKitDOMCustom.h:
2895         * bindings/gobject/WebKitDOMCustom.symbols:
2896
2897 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2898
2899         Unreviewed. Update GObject DOM symbols file after r158662.
2900
2901         * bindings/gobject/webkitdom.symbols: Add missing prototypes.
2902
2903 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2904
2905         Unreviewed. Update GObject DOM symbols file after r159208 and r159363.
2906
2907         * bindings/gobject/webkitdom.symbols: Add
2908         webkit_dom_html_media_element_fast_seek prototype.
2909
2910 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2911
2912         REGRESSION(r159363): [GTK] API break in webkit_dom_html_media_element_set_current_time
2913         https://bugs.webkit.org/show_bug.cgi?id=124485
2914
2915         Reviewed by Philippe Normand.
2916
2917         In r159363 currentTime attribute was changed to not raise
2918         exceptions. This breaks the API of GObject DOM bindings because we
2919         use a GError parameter for exceptions that has been removed.
2920
2921         * bindings/gobject/WebKitDOMCustom.cpp:
2922         (webkit_dom_html_media_element_set_current_time): Custom
2923         implementation that receives a GError for backwards
2924         compatibility.
2925         * bindings/gobject/WebKitDOMCustom.h:
2926         * bindings/gobject/WebKitDOMCustom.symbols: Add
2927         webkit_dom_html_media_element_set_current_time prototype.
2928         * bindings/scripts/CodeGeneratorGObject.pm:
2929         (SkipFunction): Skip
2930         webkit_dom_html_media_element_set_current_time since we are adding
2931         a custom implementation.
2932
2933 2013-11-17  Alexey Proskuryakov  <ap@apple.com>
2934
2935         Support exporting public RSASSA-PKCS1-v1_5 keys
2936         https://bugs.webkit.org/show_bug.cgi?id=124475
2937
2938         Reviewed by Sam Weinig.
2939
2940         Test: crypto/subtle/rsa-export-key.html
2941
2942         * bindings/js/JSCryptoKeySerializationJWK.h:
2943         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2944         (WebCore::JSCryptoKeySerializationJWK::buildJSONForRSAComponents):
2945         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
2946         (WebCore::JSCryptoKeySerializationJWK::serialize):
2947         Added said support (this part works with private keys too).
2948
2949         * crypto/keys/CryptoKeyRSA.h:
2950         * crypto/mac/CryptoKeyRSAMac.cpp:
2951         (WebCore::CryptoKeyRSA::getPublicKeyComponents): Moved the logic for getting a
2952         public key from private one here for reuse in keySizeInBits().
2953         (WebCore::CryptoKeyRSA::isRestrictedToHash):
2954         (WebCore::CryptoKeyRSA::keySizeInBits):
2955         (WebCore::CryptoKeyRSA::exportData):
2956         Exposed information necessary for JWK serialization.
2957
2958 2013-11-17  Alexey Proskuryakov  <ap@apple.com>
2959
2960         RSASSA-PKCS1-v1_5 JWK import doesn't check key size
2961         https://bugs.webkit.org/show_bug.cgi?id=124472
2962
2963         Reviewed by Sam Weinig.
2964
2965         Test: crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html
2966
2967         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2968         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Added the checks.
2969         (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Check key size when
2970         importing.
2971         (WebCore::JSCryptoKeySerializationJWK::serialize): Updated a comment.
2972
2973         * crypto/keys/CryptoKeySerializationRaw.cpp: (WebCore::CryptoKeySerializationRaw::serialize):
2974         Updated a comment.
2975
2976 2013-11-17  Alexey Proskuryakov  <ap@apple.com>
2977
2978         JWK crypto key export result is a DOM string instead of an array buffer
2979         https://bugs.webkit.org/show_bug.cgi?id=124473
2980
2981         Reviewed by Sam Weinig.
2982
2983         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::exportKey):
2984         Fix it.
2985
2986 2013-11-17  Sam Weinig  <sam@webkit.org>
2987
2988         LayoutStateMaintainer should use references where possible
2989         https://bugs.webkit.org/show_bug.cgi?id=124471
2990
2991         Reviewed by Dan Bernstein.
2992
2993         * page/FrameView.cpp:
2994         (WebCore::FrameView::layout):
2995         * rendering/LayoutState.cpp:
2996         (WebCore::LayoutState::LayoutState):
2997         * rendering/LayoutState.h:
2998         * rendering/RenderBlock.cpp:
2999         (WebCore::RenderBlock::simplifiedLayout):
3000         * rendering/RenderBlockFlow.cpp:
3001         (WebCore::RenderBlockFlow::layoutBlock):
3002         * rendering/RenderBox.cpp:
3003         (WebCore::RenderBox::layout):
3004         * rendering/RenderDeprecatedFlexibleBox.cpp:
3005         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
3006         * rendering/RenderEmbeddedObject.cpp:
3007         (WebCore::RenderEmbeddedObject::layout):
3008         * rendering/RenderFlexibleBox.cpp:
3009         (WebCore::RenderFlexibleBox::layoutBlock):
3010         * rendering/RenderFlowThread.cpp:
3011         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
3012         * rendering/RenderFlowThread.h:
3013         * rendering/RenderGrid.cpp:
3014         (WebCore::RenderGrid::layoutBlock):
3015         * rendering/RenderMedia.cpp:
3016         (WebCore::RenderMedia::layout):
3017         * rendering/RenderTable.cpp:
3018         (WebCore::RenderTable::layout):
3019         * rendering/RenderTableRow.cpp:
3020         (WebCore::RenderTableRow::layout):
3021         * rendering/RenderTableSection.cpp:
3022         (WebCore::RenderTableSection::calcRowLogicalHeight):
3023         (WebCore::RenderTableSection::layout):
3024         (WebCore::RenderTableSection::layoutRows):
3025         * rendering/RenderTextTrackCue.cpp:
3026         (WebCore::RenderTextTrackCue::layout):
3027         * rendering/RenderView.cpp:
3028         (WebCore::RenderView::pushLayoutState):
3029         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
3030         * rendering/RenderView.h:
3031         (WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
3032         (WebCore::LayoutStateMaintainer::push):
3033         (WebCore::LayoutStateMaintainer::pop):
3034
3035 2013-11-16  Alexey Proskuryakov  <ap@apple.com>
3036
3037         Use uint8_t vectors for WebCrypto data
3038         https://bugs.webkit.org/show_bug.cgi?id=124466
3039
3040         Reviewed by Sam Weinig.
3041
3042         Using Vector<char> for crypto key data is somewhat non-idiomatic, and it gets simply
3043         dangerous for bignums, because signed arithmetic is not appropriate for bignum digits.
3044
3045         * Modules/websockets/WebSocketHandshake.cpp:
3046         (WebCore::generateSecWebSocketKey):
3047         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
3048         No longer need to cast data to char* here.
3049
3050         * bindings/js/JSCryptoKeySerializationJWK.cpp:
3051         * bindings/js/JSCryptoKeySerializationJWK.h:
3052         * crypto/CryptoDigest.h:
3053         * crypto/CryptoKey.h:
3054         * crypto/keys/CryptoKeyAES.cpp:
3055         * crypto/keys/CryptoKeyAES.h:
3056         * crypto/keys/CryptoKeyDataOctetSequence.h:
3057         * crypto/keys/CryptoKeyDataRSAComponents.cpp:
3058         * crypto/keys/CryptoKeyDataRSAComponents.h:
3059         * crypto/keys/CryptoKeyHMAC.cpp:
3060         * crypto/keys/CryptoKeyHMAC.h:
3061         * crypto/keys/CryptoKeyRSA.h:
3062         * crypto/keys/CryptoKeySerializationRaw.cpp:
3063         * crypto/keys/CryptoKeySerializationRaw.h:
3064         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
3065         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
3066         * crypto/mac/CryptoDigestMac.cpp:
3067         * crypto/mac/CryptoKeyMac.cpp:
3068         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
3069         Switched to Vector<uint8_t>.
3070
3071         * crypto/mac/CryptoKeyRSAMac.cpp:
3072         (WebCore::getPublicKeyComponents): Extracted from buildAlgorithmDescription() and simplified.
3073         (WebCore::CryptoKeyRSA::create): Switched to Vector<uint8_t>.
3074         (WebCore::CryptoKeyRSA::buildAlgorithmDescription): No longer need to copy data just
3075         to change type from Vector<char> to Vector<unsigned char>.
3076         (WebCore::bigIntegerToUInt32): Ditto. No longer need to cast types when dealing with the bignum.
3077         (WebCore::CryptoKeyRSA::generatePair): Improved an error message a little.
3078
3079         * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::convertToDataURL):
3080         * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest):
3081         * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::archive):
3082         * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::CGImageToDataURL):
3083         No longer need to cast data to char* here.
3084
3085 2013-11-17  Antti Koivisto  <antti@apple.com>
3086
3087         REGRESSION (r158774): Iteration over element children is broken
3088         https://bugs.webkit.org/show_bug.cgi?id=124145
3089
3090         Reviewed by Anders Carlsson.
3091         
3092         Mutation during traversal invalidates the position cache. After the mid-point we start
3093         traversing backwards as it the shortest path. However backward traversal of children-only
3094         HTMLCollection was wrong and would end up going to descendants.
3095         
3096         Reduction by yannick.poirier@inverto.tv.
3097
3098         Test: fast/dom/htmlcollection-children-mutation.html
3099
3100         * html/HTMLCollection.cpp:
3101         (WebCore::HTMLCollection::collectionTraverseBackward):
3102         
3103             Traverse direct children only when m_shouldOnlyIncludeDirectChildren bit is set.
3104
3105 2013-11-17  Zoltan Horvath  <zoltan@webkit.org>
3106
3107         Move LineLayoutState.h into rendering/line
3108         <https://webkit.org/b/124458>
3109
3110         Reviewed by Mihnea Ovidenie.
3111
3112         LineLayoutState is a helper class of RenderBlockLineLayout, so I'm moving it into line subdirectory.
3113
3114         No new tests, no behavior change.
3115
3116         * GNUmakefile.list.am:
3117         * WebCore.vcxproj/WebCore.vcxproj:
3118         * WebCore.xcodeproj/project.pbxproj:
3119         * rendering/line/LineLayoutState.h: Renamed from Source/WebCore/rendering/LineLayoutState.h.
3120         (WebCore::FloatWithRect::FloatWithRect):
3121         (WebCore::LineLayoutState::LineLayoutState):
3122         (WebCore::LineLayoutState::lineInfo):
3123         (WebCore::LineLayoutState::endLineLogicalTop):
3124         (WebCore::LineLayoutState::setEndLineLogicalTop):
3125         (WebCore::LineLayoutState::endLine):
3126         (WebCore::LineLayoutState::setEndLine):
3127         (WebCore::LineLayoutState::lastFloat):
3128         (WebCore::LineLayoutState::setLastFloat):
3129         (WebCore::LineLayoutState::floats):
3130         (WebCore::LineLayoutState::floatIndex):
3131         (WebCore::LineLayoutState::setFloatIndex):
3132         (WebCore::LineLayoutState::adjustedLogicalLineTop):
3133         (WebCore::LineLayoutState::setAdjustedLogicalLineTop):
3134         (WebCore::LineLayoutState::flowThread):
3135         (WebCore::LineLayoutState::setFlowThread):
3136         (WebCore::LineLayoutState::endLineMatched):
3137         (WebCore::LineLayoutState::setEndLineMatched):
3138         (WebCore::LineLayoutState::checkForFloatsFromLastLine):
3139         (WebCore::LineLayoutState::setCheckForFloatsFromLastLine):
3140         (WebCore::LineLayoutState::markForFullLayout):
3141         (WebCore::LineLayoutState::isFullLayout):
3142         (WebCore::LineLayoutState::usesRepaintBounds):
3143         (WebCore::LineLayoutState::setRepaintRange):
3144         (WebCore::LineLayoutState::updateRepaintRangeFromBox):
3145
3146 2013-11-17  Antti Koivisto  <antti@apple.com>
3147
3148         Simple line path does not respect visibility:hidden
3149         https://bugs.webkit.org/show_bug.cgi?id=124467
3150
3151         Reviewed by Anders Carlsson.
3152
3153         Test: fast/text/text-visibility.html
3154
3155         * rendering/SimpleLineLayoutFunctions.cpp:
3156         (WebCore::SimpleLineLayout::paintFlow):
3157
3158 2013-11-16  Alexey Proskuryakov  <ap@apple.com>
3159
3160         WebCrypto no longer uses sequences of ArrayBuffers
3161         https://bugs.webkit.org/show_bug.cgi?id=124451
3162
3163         Build fix.
3164
3165         * crypto/mac/CryptoAlgorithmHMACMac.cpp: (WebCore::calculateSignature):
3166         Now that the function became shorter, clang realized that a variable was used
3167         uninitialized in an impossible code path.
3168
3169 2013-11-16  Alexey Proskuryakov  <ap@apple.com>
3170
3171         WebCrypto no longer uses sequences of ArrayBuffers
3172         https://bugs.webkit.org/show_bug.cgi?id=124451
3173
3174         Reviewed by Sam Weinig.
3175
3176         Covered by existing tests.
3177
3178         Changed all operations to take single CryptoOperationData objects.
3179
3180         * bindings/js/JSCryptoOperationData.cpp:
3181         * bindings/js/JSCryptoOperationData.h:
3182         * bindings/js/JSSubtleCryptoCustom.cpp:
3183         (WebCore::JSSubtleCrypto::encrypt):
3184         (WebCore::JSSubtleCrypto::decrypt):
3185         (WebCore::JSSubtleCrypto::sign):
3186         (WebCore::JSSubtleCrypto::verify):
3187         (WebCore::JSSubtleCrypto::digest):
3188         * crypto/CryptoAlgorithm.cpp:
3189         (WebCore::CryptoAlgorithm::encrypt):
3190         (WebCore::CryptoAlgorithm::decrypt):
3191         (WebCore::CryptoAlgorithm::sign):
3192         (WebCore::CryptoAlgorithm::verify):
3193         (WebCore::CryptoAlgorithm::digest):
3194         * crypto/CryptoAlgorithm.h:
3195         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
3196         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
3197         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
3198         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
3199         * crypto/algorithms/CryptoAlgorithmHMAC.h:
3200         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
3201         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
3202         (WebCore::CryptoAlgorithmSHA1::digest):
3203         * crypto/algorithms/CryptoAlgorithmSHA1.h:
3204         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
3205         (WebCore::CryptoAlgorithmSHA224::digest):
3206         * crypto/algorithms/CryptoAlgorithmSHA224.h:
3207         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
3208         (WebCore::CryptoAlgorithmSHA256::digest):
3209         * crypto/algorithms/CryptoAlgorithmSHA256.h:
3210         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
3211         (WebCore::CryptoAlgorithmSHA384::digest):
3212         * crypto/algorithms/CryptoAlgorithmSHA384.h:
3213         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
3214         (WebCore::CryptoAlgorithmSHA512::digest):
3215         * crypto/algorithms/CryptoAlgorithmSHA512.h:
3216         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
3217         (WebCore::transformAES_CBC):
3218         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
3219         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
3220         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
3221         (WebCore::calculateSignature):
3222         (WebCore::CryptoAlgorithmHMAC::sign):
3223         (WebCore::CryptoAlgorithmHMAC::verify):
3224         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
3225
3226 2013-11-16  Zoltan Horvath  <zoltan@webkit.org>
3227
3228         Remove the include of LineWidth.h from SimpleLineLayoutFunctions.cpp
3229         <https://webkit.org/b/124449>
3230
3231         Reviewed by Antti Koivisto.
3232
3233         I removed the include of LineWidth, since SimpleLineLayoutFunctions.cpp doesn't use it.
3234
3235         No new tests, no behavior change.
3236
3237         * rendering/SimpleLineLayoutFunctions.cpp:
3238
3239 2013-11-15  Alexey Proskuryakov  <ap@apple.com>
3240
3241         Support exporting symmetric keys as JWK
3242         https://bugs.webkit.org/show_bug.cgi?id=124442
3243
3244         Reviewed by Sam Weinig.
3245
3246         Error handling is not consistent yet - some errors cause exceptions, and others
3247         result in rejected promises. This part of spec is incomplete, so I basically did
3248         what was most straightforward in each case.
3249
3250         * bindings/js/JSCryptoKeySerializationJWK.h: 
3251         * bindings/js/JSCryptoKeySerializationJWK.cpp:
3252         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Updated a comment with a better link.
3253         (WebCore::JSCryptoKeySerializationJWK::buildJSONForOctetSequence): A helper to building JWK.
3254         (WebCore::JSCryptoKeySerializationJWK::addToJSON): Ditto.
3255         (WebCore::JSCryptoKeySerializationJWK::addBoolToJSON): Ditto.
3256         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON): Ditto. The code for
3257         mapping is my best guess, this all needs to be specified.
3258         (WebCore::JSCryptoKeySerializationJWK::addJWKUseToJSON): A helper to building JWK.
3259         (WebCore::JSCryptoKeySerializationJWK::serialize): Build a JSON string for the key.
3260
3261         * bindings/js/JSSubtleCryptoCustom.cpp:
3262         (WebCore::JSSubtleCrypto::importKey): Updated a comment.
3263         (WebCore::JSSubtleCrypto::exportKey): Use CryptoKeySerialization (also for raw keys,
3264         for consistency).
3265
3266         * crypto/CryptoKey.h:
3267         (WebCore::CryptoKey::algorithmIdentifier):
3268         (WebCore::CryptoKey::usagesBitmap):
3269         Exposed data needed for building JWK (it used to be only exposed in a form suitable
3270         for DOM accessors).
3271
3272         * crypto/keys/CryptoKeyHMAC.h: Ditto, added an accessor for JWK.
3273
3274         * crypto/keys/CryptoKeySerializationRaw.cpp: (WebCore::CryptoKeySerializationRaw::serialize):
3275         * crypto/keys/CryptoKeySerializationRaw.h:
3276         Moved from JSSubtleCryptoCustom.cpp for consistency.
3277
3278 2013-11-15  Brady Eidson  <beidson@apple.com>
3279
3280         Move IDBCursorBackend operations into their own files
3281         https://bugs.webkit.org/show_bug.cgi?id=124444
3282
3283         Reviewed by Tim Horton.
3284
3285         * CMakeLists.txt:
3286         * GNUmakefile.list.am:
3287         * WebCore.xcodeproj/project.pbxproj:
3288
3289         * Modules/indexeddb/IDBCursorBackend.cpp:
3290         * Modules/indexeddb/IDBCursorBackend.h:
3291         (WebCore::IDBCursorBackend::cursorType):
3292         (WebCore::IDBCursorBackend::deprecatedBackingStoreCursor):
3293         (WebCore::IDBCursorBackend::deprecatedSetBackingStoreCursor):
3294         (WebCore::IDBCursorBackend::deprecatedSetSavedBackingStoreCursor):
3295
3296         * Modules/indexeddb/IDBCursorBackendOperations.cpp: Added.
3297         (WebCore::CallOnDestruct::CallOnDestruct):
3298         (WebCore::CallOnDestruct::~CallOnDestruct):
3299         (WebCore::CursorAdvanceOperation::perform):
3300         (WebCore::CursorIterationOperation::perform):
3301         (WebCore::CursorPrefetchIterationOperation::perform):
3302         * Modules/indexeddb/IDBCursorBackendOperations.h: Added.
3303         (WebCore::CursorIterationOperation::create):
3304         (WebCore::CursorIterationOperation::CursorIterationOperation):
3305         (WebCore::CursorAdvanceOperation::create):
3306         (WebCore::CursorAdvanceOperation::CursorAdvanceOperation):
3307         (WebCore::CursorPrefetchIterationOperation::create):
3308         (WebCore::CursorPrefetchIterationOperation::CursorPrefetchIterationOperation):
3309
3310 2013-11-14  David Farler  <dfarler@apple.com>
3311
3312         Copy ASAN flag settings to WebCore and JavaScriptCore intermediate build tools
3313         https://bugs.webkit.org/show_bug.cgi?id=124362
3314
3315         Reviewed by David Kilzer.
3316
3317         No new tests needed.
3318
3319         * WebCore.xcodeproj/project.pbxproj:
3320         Use ASAN_C*FLAGS for WebCoreExportFileGenerator.
3321
3322 2013-11-15  Jer Noble  <jer.noble@apple.com>
3323
3324         [Mac][AVF] Allow video and audio tracks to be initialized with an AVAssetTrack.
3325         https://bugs.webkit.org/show_bug.cgi?id=124421
3326
3327         Reviewed by Eric Carlson.
3328
3329         Currently, VideoTrackPrivateAVFObjC and AudioTrackPrivateAVFObjC are initialized with an
3330         AVPlayerItemTrack, but most of its methods use the AVAssetTrack wrapped by the
3331         AVPlayerItemTrack. Allow these objects to be alternatively initialized with an AVAssetTrack.
3332
3333         Add factory methods taking an AVAssetTrack:
3334         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
3335         (WebCore::AudioTrackPrivateAVFObjC::create):
3336         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
3337         (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC):
3338         (WebCore::AudioTrackPrivateAVFObjC::setAssetTrack):
3339         (WebCore::AudioTrackPrivateAVFObjC::assetTrack):
3340         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
3341         (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC):
3342         (WebCore::VideoTrackPrivateAVFObjC::setAssetTrack):
3343         (WebCore::VideoTrackPrivateAVFObjC::assetTrack):
3344         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
3345
3346         Use m_assetTrack instead of [m_playerItemTrack assetTrack]:
3347         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
3348         (WebCore::AVTrackPrivateAVFObjCImpl::assetTrack):
3349         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
3350         (WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl):
3351         (WebCore::AVTrackPrivateAVFObjCImpl::enabled):
3352         (WebCore::AVTrackPrivateAVFObjCImpl::setEnabled):
3353         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind):
3354         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind):
3355         (WebCore::AVTrackPrivateAVFObjCImpl::id):
3356         (WebCore::AVTrackPrivateAVFObjCImpl::label):
3357         (WebCore::AVTrackPrivateAVFObjCImpl::language):
3358         (WebCore::AVTrackPrivateAVFObjCImpl::trackID):
3359
3360
3361 2013-11-15  Brady Eidson  <beidson@apple.com>
3362
3363         Let IDBDatabaseBackend create IDBTransactionBackend's directly
3364         https://bugs.webkit.org/show_bug.cgi?id=124438
3365
3366         Reviewed by Beth Dakin.
3367
3368         Create IDBTransactionBackends directly:
3369         * Modules/indexeddb/IDBDatabaseBackend.cpp:
3370         (WebCore::IDBDatabaseBackend::createTransaction):
3371         * Modules/indexeddb/IDBDatabaseBackend.h:
3372
3373         Remove maybeCreateTransactionBackend():
3374         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3375         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3376         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3377
3378 2013-11-15  Jer Noble  <jer.noble@apple.com>
3379
3380         HTMLMediaElement should not throw an exception from setCurrentTime or fastSeek.
3381         https://bugs.webkit.org/show_bug.cgi?id=124294
3382
3383         Reviewed by Eric Carlson.
3384
3385         Update the seek logic to match the current specification. This means removing exception
3386         throwing from both the .idl and the implementation. 
3387
3388         Remove the ExceptionCode parameter from setCurrentTime and fastSeek:
3389         * html/HTMLMediaElement.cpp:
3390         (HTMLMediaElement::fastSeek):
3391         (HTMLMediaElement::seek):
3392         (HTMLMediaElement::seekWithTolerance):
3393         (HTMLMediaElement::setCurrentTime):
3394         * html/HTMLMediaElement.h:
3395         * html/HTMLMediaElement.idl:
3396         * html/MediaController.cpp:
3397         (MediaController::setCurrentTime):
3398         * html/MediaController.h:
3399         * html/MediaController.idl:
3400         * html/MediaControllerInterface.h:
3401
3402         Do not pass in an ExceptionCode placeholder when calling seek:
3403         * html/HTMLMediaElement.cpp:
3404         (HTMLMediaElement::rewind):
3405         (HTMLMediaElement::returnToRealtime):
3406         (HTMLMediaElement::finishSeek):
3407         (HTMLMediaElement::playInternal):
3408         (HTMLMediaElement::mediaPlayerTimeChanged):
3409         (HTMLMediaElement::mediaPlayerDurationChanged):
3410         (HTMLMediaElement::applyMediaFragmentURI):
3411         * html/HTMLMediaElement.h:
3412         * html/HTMLMediaElement.idl:
3413         * html/MediaController.cpp:
3414         (MediaController::bringElementUpToSpeed):
3415         * html/MediaController.h:
3416         * html/MediaController.idl:
3417         * html/MediaControllerInterface.h:
3418         * html/shadow/MediaControlElementTypes.cpp:
3419         (WebCore::MediaControlSeekButtonElement::seekTimerFired):
3420         * html/shadow/MediaControlElements.cpp:
3421         (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
3422         (WebCore::MediaControlTimelineElement::defaultEventHandler):
3423         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
3424         (-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
3425
3426 2013-11-15  Brady Eidson  <beidson@apple.com>
3427
3428         Remove last vestiges of IDBBackingStore* from IDBTransactionBackend.
3429         https://bugs.webkit.org/show_bug.cgi?id=124436
3430
3431         Reviewed by Tim Horton.
3432
3433         * Modules/indexeddb/IDBFactoryBackendInterface.h: Removed createCursorBackend.
3434         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed createCursorBackend.
3435         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed createCursorBackend.
3436
3437         * Modules/indexeddb/IDBCursorBackend.h:
3438
3439         * Modules/indexeddb/IDBTransactionBackend.cpp:
3440         * Modules/indexeddb/IDBTransactionBackend.h:
3441
3442         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
3443         (WebCore::IDBServerConnectionLevelDB::openCursor):
3444
3445 2013-11-15  Brady Eidson  <beidson@apple.com>
3446
3447         Make IDBIndexWriter a LevelDB specific concept
3448         https://bugs.webkit.org/show_bug.cgi?id=124434
3449
3450         Reviewed by Tim Horton.
3451
3452         This includes renaming the class and moving it into the leveldb subdirectory.
3453
3454         * CMakeLists.txt:
3455         * GNUmakefile.list.am:
3456         * WebCore.xcodeproj/project.pbxproj:
3457
3458         * Modules/indexeddb/IDBBackingStoreInterface.h:
3459         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
3460
3461         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3462         (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
3463         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3464
3465         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBIndexWriter.cpp.
3466         (WebCore::IDBIndexWriterLevelDB::IDBIndexWriterLevelDB):
3467         (WebCore::IDBIndexWriterLevelDB::writeIndexKeys):
3468         (WebCore::IDBIndexWriterLevelDB::verifyIndexKeys):
3469         (WebCore::IDBIndexWriterLevelDB::addingKeyAllowed):
3470         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBIndexWriter.h.
3471         (WebCore::IDBIndexWriterLevelDB::create):
3472
3473         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
3474         (WebCore::IDBServerConnectionLevelDB::setIndexKeys):
3475         (WebCore::IDBServerConnectionLevelDB::put):
3476
3477 2013-11-15  Alexandru Chiculita  <achicu@adobe.com>
3478
3479         Web Inspector: DOM.performSearch should accept a list of context nodes
3480         https://bugs.webkit.org/show_bug.cgi?id=124390
3481
3482         Reviewed by Timothy Hatcher.
3483
3484         Extracted the code in InspectorDOMAgent::performSearch into its own helper class
3485         called InspectorNodeFinder. Also added a new array parameter called "nodeIds"
3486         that can be used to limit the search results to just partial subtrees.
3487
3488         Tests: inspector-protocol/dom/dom-search-crash.html
3489                inspector-protocol/dom/dom-search-with-context.html
3490                inspector-protocol/dom/dom-search.html
3491
3492         * CMakeLists.txt:
3493         * GNUmakefile.list.am:
3494         * WebCore.vcxproj/WebCore.vcxproj:
3495         * WebCore.vcxproj/WebCore.vcxproj.filters:
3496         * WebCore.xcodeproj/project.pbxproj:
3497         * inspector/protocol/DOM.json:
3498         * inspector/InspectorAllInOne.cpp:
3499         * inspector/InspectorDOMAgent.cpp:
3500         (WebCore::InspectorDOMAgent::performSearch):
3501         * inspector/InspectorDOMAgent.h:
3502         * inspector/InspectorNodeFinder.cpp: Added.
3503         (WebCore::stripCharacters):
3504         (WebCore::InspectorNodeFinder::InspectorNodeFinder):
3505         (WebCore::InspectorNodeFinder::performSearch):
3506         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
3507         (WebCore::InspectorNodeFinder::matchesAttribute):
3508         (WebCore::InspectorNodeFinder::matchesElement):
3509         (WebCore::InspectorNodeFinder::searchUsingXPath):
3510         (WebCore::InspectorNodeFinder::searchUsingCSSSelectors):
3511         * inspector/InspectorNodeFinder.h: Added.
3512         (WebCore::InspectorNodeFinder::results):
3513
3514 2013-11-15  Brady Eidson  <beidson@apple.com>
3515
3516         Remove IDBBackingStoreInterface.h includes that are no longer needed
3517         https://bugs.webkit.org/show_bug.cgi?id=124433
3518
3519         Reviewed by Tim Horton.
3520
3521         * Modules/indexeddb/IDBCursorBackend.cpp:
3522         * Modules/indexeddb/IDBCursorBackend.h:
3523         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3524         * Modules/indexeddb/IDBTransactionBackend.h:
3525
3526 2013-11-15  Zoltan Horvath  <zoltan@webkit.org>
3527
3528         Move BreakingContext and LineBreaker into their own files
3529         <https://webkit.org/b/124336>
3530
3531         Reviewed by David Hyatt.
3532
3533         In this change I introduced 'line' subdirectory inside 'rendering', this directory will contain all the classes
3534         which have been refactored from RenderBlockLineLayout.cpp. This change contains the separation of BreakingContext,
3535         and the separation of LineBreaker classes. Since I wanted to keep the helper functions organized, I also added a
3536         new file called LineInlineHeaders.h, which contains the functions which used in LineBreaker.h and BreakingContext.h.
3537         I moved LineInfo class into line directory. It was necessary this time, since I added a cpp for it. I'll move the
3538         rest of the line layout related helper classes later. (I wanted to minimize merge conflicts.)
3539
3540         No new tests, no behavior change.
3541
3542         * CMakeLists.txt:
3543         * GNUmakefile.am:
3544         * GNUmakefile.list.am:
3545         * WebCore.vcxproj/WebCore.vcxproj:
3546         * WebCore.vcxproj/WebCoreCommon.props:
3547         * WebCore.xcodeproj/project.pbxproj:
3548         * rendering/RenderBlockLineLayout.cpp:
3549         (WebCore::createRun):
3550         * rendering/line/BreakingContextInlineHeaders.h: Added.
3551         (WebCore::WordMeasurement::WordMeasurement):
3552         (WebCore::TrailingObjects::TrailingObjects):
3553         (WebCore::TrailingObjects::setTrailingWhitespace):
3554         (WebCore::TrailingObjects::clear):
3555         (WebCore::TrailingObjects::appendBoxIfNeeded):
3556         (WebCore::deprecatedAddMidpoint):
3557         (WebCore::startIgnoringSpaces):
3558         (WebCore::stopIgnoringSpaces):
3559         (WebCore::ensureLineBoxInsideIgnoredSpaces):
3560         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
3561         (WebCore::BreakingContext::BreakingContext):
3562         (WebCore::BreakingContext::currentObject):
3563         (WebCore::BreakingContext::lineBreak):
3564         (WebCore::BreakingContext::lineBreakRef):
3565         (WebCore::BreakingContext::lineWidth):
3566         (WebCore::BreakingContext::atEnd):
3567         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
3568         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
3569         (WebCore::BreakingContext::initializeForCurrentObject):
3570         (WebCore::BreakingContext::increment):
3571         (WebCore::BreakingContext::handleBR):
3572         (WebCore::borderPaddingMarginStart):
3573         (WebCore::borderPaddingMarginEnd):
3574         (WebCore::shouldAddBorderPaddingMargin):
3575         (WebCore::previousInFlowSibling):
3576         (WebCore::inlineLogicalWidth):
3577         (WebCore::BreakingContext::handleOutOfFlowPositioned):
3578         (WebCore::BreakingContext::handleFloat):
3579         (WebCore::shouldSkipWhitespaceAfterStartObject):
3580         (WebCore::BreakingContext::handleEmptyInline):
3581         (WebCore::BreakingContext::handleReplaced):
3582         (WebCore::firstPositiveWidth):
3583         (WebCore::updateSegmentsForShapes):
3584         (WebCore::iteratorIsBeyondEndOfRenderCombineText):
3585         (WebCore::nextCharacter):
3586         (WebCore::updateCounterIfNeeded):
3587         (WebCore::measureHyphenWidth):
3588         (WebCore::textWidth):
3589         (WebCore::ensureCharacterGetsLineBox):
3590         (WebCore::tryHyphenating):
3591         (WebCore::BreakingContext::handleText):
3592         (WebCore::textBeginsWithBreakablePosition):
3593         (WebCore::BreakingContext::canBreakAtThisPosition):
3594         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
3595         (WebCore::checkMidpoints):
3596         (WebCore::BreakingContext::handleEndOfLine):
3597         * rendering/line/LineBreaker.cpp: Added.
3598         (WebCore::LineBreaker::reset):
3599         (WebCore::LineBreaker::skipTrailingWhitespace):
3600         (WebCore::LineBreaker::skipLeadingWhitespace):
3601         * rendering/line/LineBreaker.h: Added.
3602         (WebCore::LineBreaker::LineBreaker):
3603         (WebCore::LineBreaker::lineWasHyphenated):
3604         (WebCore::LineBreaker::positionedObjects):
3605         (WebCore::LineBreaker::clear):
3606         * rendering/line/LineInfo.cpp: Added.
3607         (WebCore::LineInfo::setEmpty):
3608         * rendering/line/LineInfo.h: Renamed from Source/WebCore/rendering/LineInfo.h.
3609         (WebCore::LineInfo::LineInfo):
3610         (WebCore::LineInfo::isFirstLine):
3611         (WebCore::LineInfo::isLastLine):
3612         (WebCore::LineInfo::isEmpty):
3613         (WebCore::LineInfo::previousLineBrokeCleanly):
3614         (WebCore::LineInfo::floatPaginationStrut):
3615         (WebCore::LineInfo::runsFromLeadingWhitespace):
3616         (WebCore::LineInfo::resetRunsFromLeadingWhitespace):
3617         (WebCore::LineInfo::incrementRunsFromLeadingWhitespace):
3618         (WebCore::LineInfo::setFirstLine):
3619         (WebCore::LineInfo::setLastLine):
3620         (WebCore::LineInfo::setPreviousLineBrokeCleanly):
3621         (WebCore::LineInfo::setFloatPaginationStrut):
3622         * rendering/line/LineInlineHeaders.h: Added.
3623         (WebCore::hasInlineDirectionBordersPaddingOrMargin):
3624         (WebCore::lineStyle):
3625         (WebCore::requiresLineBoxForContent):
3626         (WebCore::shouldCollapseWhiteSpace):
3627         (WebCore::skipNonBreakingSpace):
3628         (WebCore::alwaysRequiresLineBox):
3629         (WebCore::requiresLineBox):
3630         (WebCore::setStaticPositions):
3631
3632 2013-11-15  Brady Eidson  <beidson@apple.com>
3633
3634         Move execution of IDBTransactionBackendOperations to the IDBServerConnection
3635         https://bugs.webkit.org/show_bug.cgi?id=124385
3636
3637         Reviewed by Tim Horton.
3638
3639         Each IDBOperation has it’s ::perform() moved to a method on IDBServerConnection.
3640         This almost removes all knowledge of the backing stores from the front end.
3641
3642         * Modules/indexeddb/IDBDatabaseBackend.cpp:
3643         (WebCore::IDBDatabaseBackend::clearObjectStore):
3644         (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
3645         * Modules/indexeddb/IDBDatabaseBackend.h:
3646
3647         * Modules/indexeddb/IDBObjectStore.cpp:
3648         (WebCore::IDBObjectStore::clear):
3649
3650         Add methods to reflect each transaction backend operation:
3651         * Modules/indexeddb/IDBServerConnection.h:
3652
3653         Schedule certain operations with callbacks:
3654         * Modules/indexeddb/IDBTransactionBackend.cpp:
3655         (WebCore::IDBTransactionBackend::scheduleVersionChangeOperation):
3656         (WebCore::IDBTransactionBackend::schedulePutOperation):
3657         (WebCore::IDBTransactionBackend::scheduleOpenCursorOperation):
3658         (WebCore::IDBTransactionBackend::scheduleCountOperation):
3659         (WebCore::IDBTransactionBackend::scheduleDeleteRangeOperation):
3660         (WebCore::IDBTransactionBackend::scheduleClearObjectStoreOperation):
3661         * Modules/indexeddb/IDBTransactionBackend.h:
3662
3663         Make each operation’s perform() method defer to the IDBServerConnection (with a callback):
3664         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
3665         (WebCore::CreateObjectStoreOperation::perform):
3666         (WebCore::CreateIndexOperation::perform):
3667         (WebCore::CreateIndexAbortOperation::perform):
3668         (WebCore::DeleteIndexOperation::perform):
3669         (WebCore::DeleteIndexAbortOperation::perform):
3670         (WebCore::GetOperation::perform):
3671         (WebCore::PutOperation::perform):
3672         (WebCore::SetIndexesReadyOperation::perform):
3673         (WebCore::OpenCursorOperation::perform):
3674         (WebCore::CountOperation::perform):
3675         (WebCore::DeleteRangeOperation::perform):
3676         (WebCore::ClearObjectStoreOperation::perform):
3677         (WebCore::DeleteObjectStoreOperation::perform):
3678         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
3679         (WebCore::CreateObjectStoreAbortOperation::perform):
3680
3681         Add accessors to each operation’s data members so the IDBServerConnection has everything it needs:
3682         * Modules/indexeddb/IDBTransactionBackendOperations.h:
3683         (WebCore::CreateObjectStoreOperation::objectStoreMetadata):
3684         (WebCore::DeleteObjectStoreOperation::objectStoreMetadata):
3685         (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
3686         (WebCore::IDBDatabaseBackend::VersionChangeOperation::version):
3687         (WebCore::IDBDatabaseBackend::VersionChangeOperation::callbacks):
3688         (WebCore::IDBDatabaseBackend::VersionChangeOperation::databaseCallbacks):
3689         (WebCore::IDBDatabaseBackend::VersionChangeOperation::VersionChangeOperation):
3690         (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
3691         (WebCore::CreateIndexOperation::objectStoreID):
3692         (WebCore::CreateIndexOperation::idbIndexMetadata):
3693         (WebCore::CreateIndexOperation::CreateIndexOperation):
3694         (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
3695         (WebCore::DeleteIndexOperation::objectStoreID):
3696         (WebCore::DeleteIndexOperation::idbIndexMetadata):
3697         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
3698         (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
3699         (WebCore::GetOperation::objectStoreID):
3700         (WebCore::GetOperation::indexID):
3701         (WebCore::GetOperation::cursorType):
3702         (WebCore::GetOperation::keyRange):
3703         (WebCore::GetOperation::callbacks):
3704         (WebCore::GetOperation::autoIncrement):
3705         (WebCore::GetOperation::keyPath):
3706         (WebCore::GetOperation::GetOperation):
3707         (WebCore::PutOperation::create):
3708         (WebCore::PutOperation::putMode):
3709         (WebCore::PutOperation::objectStore):
3710         (WebCore::PutOperation::key):
3711         (WebCore::PutOperation::indexIDs):
3712         (WebCore::PutOperation::indexKeys):
3713         (WebCore::PutOperation::callbacks):
3714         (WebCore::PutOperation::value):
3715         (WebCore::PutOperation::PutOperation):
3716         (WebCore::OpenCursorOperation::create):
3717         (WebCore::OpenCursorOperation::objectStoreID):
3718         (WebCore::OpenCursorOperation::indexID):
3719         (WebCore::OpenCursorOperation::direction):
3720         (WebCore::OpenCursorOperation::cursorType):
3721         (WebCore::OpenCursorOperation::taskType):
3722         (WebCore::OpenCursorOperation::keyRange):
3723         (WebCore::OpenCursorOperation::cursorDirection):
3724         (WebCore::OpenCursorOperation::callbacks):
3725         (WebCore::OpenCursorOperation::OpenCursorOperation):
3726         (WebCore::CountOperation::create):
3727         (WebCore::CountOperation::objectStoreID):
3728         (WebCore::CountOperation::indexID):
3729         (WebCore::CountOperation::keyRange):
3730         (WebCore::CountOperation::callbacks):
3731         (WebCore::CountOperation::CountOperation):
3732         (WebCore::DeleteRangeOperation::create):
3733         (WebCore::DeleteRangeOperation::objectStoreID):
3734         (WebCore::DeleteRangeOperation::callbacks):
3735         (WebCore::DeleteRangeOperation::keyRange):
3736         (WebCore::DeleteRangeOperation::DeleteRangeOperation):
3737         (WebCore::ClearObjectStoreOperation::create):
3738         (WebCore::ClearObjectStoreOperation::objectStoreID):
3739         (WebCore::ClearObjectStoreOperation::callbacks):
3740         (WebCore::ClearObjectStoreOperation::ClearObjectStoreOperation):
3741
3742         Implement each operation in terms of the appropriate backing store, then perform the callback:
3743         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
3744         (WebCore::IDBServerConnectionLevelDB::createObjectStore):
3745         (WebCore::IDBServerConnectionLevelDB::createIndex):
3746         (WebCore::IDBServerConnectionLevelDB::deleteIndex):
3747         (WebCore::IDBServerConnectionLevelDB::get):
3748         (WebCore::IDBServerConnectionLevelDB::put):
3749         (WebCore::IDBServerConnectionLevelDB::openCursor):
3750         (WebCore::IDBServerConnectionLevelDB::count):
3751         (WebCore::IDBServerConnectionLevelDB::deleteRange):
3752         (WebCore::IDBServerConnectionLevelDB::clearObjectStore):
3753         (WebCore::IDBServerConnectionLevelDB::deleteObjectStore):
3754         (WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion):
3755         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
3756
3757         * WebCore.xcodeproj/project.pbxproj:
3758
3759 2013-11-15  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3760
3761         Modifying RTCIceCandidate object construction to match the spec
3762         https://bugs.webkit.org/show_bug.cgi?id=124369
3763
3764         Reviewed by Eric Carlson.
3765
3766         According to the spec the RTCIceCandidateInit parameter in RTCSessionDescription constructor is optional,
3767         which must not be nullable, and, if passed, must be a valid Dictionary. If the keys are not present, the string
3768         object that stores them in the RTCIceCandidate class, must be null in those cases. Also, if a key is present
3769         and its value is not valid an exception must be raised.
3770
3771         Existing test was updated.
3772
3773         * GNUmakefile.list.am:
3774         * Modules/mediastream/RTCIceCandidate.cpp:
3775         (WebCore::RTCIceCandidate::create):
3776         * Modules/mediastream/RTCIceCandidate.idl:
3777         * UseJSC.cmake:
3778         * WebCore.vcxproj/WebCore.vcxproj:
3779         * WebCore.vcxproj/WebCore.vcxproj.filters:
3780         * WebCore.xcodeproj/project.pbxproj:
3781         * bindings/js/JSRTCIceCandidateCustom.cpp: Added.
3782         (WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):
3783
3784 2013-11-15  Commit Queue  <commit-queue@webkit.org>
3785
3786         Unreviewed, rolling out r159337.
3787         http://trac.webkit.org/changeset/159337
3788         https://bugs.webkit.org/show_bug.cgi?id=124423
3789
3790         broke a bunch of fast/regions tests on EFL/GTK (Requested by
3791         philn on #webkit).
3792
3793         * rendering/InlineFlowBox.cpp:
3794         (WebCore::InlineFlowBox::setLayoutOverflow):
3795         (WebCore::InlineFlowBox::setVisualOverflow):
3796         * rendering/InlineFlowBox.h:
3797         * rendering/RenderBlock.cpp:
3798         (WebCore::RenderBlock::addOverflowFromChildren):
3799         (WebCore::RenderBlock::paint):
3800         (WebCore::RenderBlock::paintObject):
3801         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
3802         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
3803         * rendering/RenderBlockFlow.cpp:
3804         (WebCore::RenderBlockFlow::hasNextPage):
3805         (WebCore::RenderBlockFlow::relayoutForPagination):
3806         * rendering/RenderBlockLineLayout.cpp:
3807         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
3808         * rendering/RenderBox.cpp:
3809         (WebCore::RenderBox::borderBoxRectInRegion):
3810         (WebCore::RenderBox::computeRectForRepaint):
3811         (WebCore::RenderBox::addLayoutOverflow):
3812         (WebCore::RenderBox::addVisualOverflow):
3813         (WebCore::RenderBox::isUnsplittableForPagination):
3814         (WebCore::RenderBox::overflowRectForPaintRejection):
3815         * rendering/RenderBox.h:
3816         * rendering/RenderBoxModelObject.cpp:
3817         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3818         * rendering/RenderBoxModelObject.h:
3819         * rendering/RenderBoxRegionInfo.h:
3820         (WebCore::RenderBoxRegionInfo::createOverflow):
3821         * rendering/RenderFlowThread.cpp:
3822         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
3823         (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
3824         (WebCore::RenderFlowThread::checkRegionsWithStyling):
3825         (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
3826         (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
3827         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
3828         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
3829         * rendering/RenderFlowThread.h:
3830         * rendering/RenderLayer.cpp:
3831         (WebCore::RenderLayer::updateLayerPositions):
3832         (WebCore::expandClipRectForDescendantsAndReflection):
3833         (WebCore::RenderLayer::paintLayer):
3834         (WebCore::RenderLayer::paintLayerContents):
3835         (WebCore::RenderLayer::updatePaintingInfoForFragments):
3836         (WebCore::RenderLayer::paintForegroundForFragments):
3837         (WebCore::RenderLayer::hitTest):
3838         (WebCore::RenderLayer::hitTestLayer):
3839         (WebCore::RenderLayer::calculateClipRects):
3840         (WebCore::RenderLayer::parentClipRects):
3841         (WebCore::RenderLayer::calculateRects):
3842         (WebCore::RenderLayer::intersectsDamageRect):
3843         (WebCore::RenderLayer::repaintIncludingDescendants):
3844         * rendering/RenderLayer.h:
3845         * rendering/RenderLayerCompositor.cpp:
3846         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3847         * rendering/RenderListItem.cpp:
3848         (WebCore::RenderListItem::addOverflowFromChildren):
3849         * rendering/RenderMultiColumnSet.cpp:
3850         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
3851         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
3852         * rendering/RenderMultiColumnSet.h:
3853         * rendering/RenderNamedFlowFragment.cpp:
3854         (WebCore::RenderNamedFlowFragment::createStyle):
3855         * rendering/RenderNamedFlowFragment.h:
3856         * rendering/RenderOverflow.h:
3857         * rendering/RenderRegion.cpp:
3858         (WebCore::RenderRegion::flowThreadPortionOverflowRect):
3859         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
3860         (WebCore::shouldPaintRegionContentsInPhase):
3861         (WebCore::RenderRegion::paintObject):
3862         (WebCore::RenderRegion::hitTestContents):
3863         (WebCore::RenderRegion::computeOverflowFromFlowThread):
3864         (WebCore::RenderRegion::repaintFlowThreadContent):
3865         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
3866         (WebCore::RenderRegion::insertedIntoTree):
3867         (WebCore::RenderRegion::ensureOverflowForBox):
3868         (WebCore::RenderRegion::rectFlowPortionForBox):
3869         (WebCore::RenderRegion::addLayoutOverflowForBox):
3870         (WebCore::RenderRegion::addVisualOverflowForBox):
3871         (WebCore::RenderRegion::layoutOverflowRectForBox):
3872         (WebCore::RenderRegion::visualOverflowRectForBox):
3873         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
3874         * rendering/RenderRegion.h:
3875         * rendering/RenderReplaced.cpp:
3876         (WebCore::RenderReplaced::shouldPaint):
3877         * rendering/RootInlineBox.cpp:
3878         (WebCore::RootInlineBox::paint):
3879
3880 2013-11-15  Antti Koivisto  <antti@apple.com>
3881
3882         Hovering over text using simple line path should not cause switch to line boxes
3883         https://bugs.webkit.org/show_bug.cgi?id=124418
3884
3885         Reviewed by Anders Carlsson.
3886
3887         Test: fast/text/simple-lines-hover.html
3888
3889         * rendering/RenderText.cpp:
3890         (WebCore::RenderText::absoluteRects):
3891         (WebCore::RenderText::absoluteQuadsClippedToEllipsis):
3892         (WebCore::RenderText::absoluteQuads):
3893         
3894             Collect quads and rects directly from simple lines without requiring the line box switch.
3895
3896         * rendering/SimpleLineLayoutFunctions.cpp:
3897         (WebCore::SimpleLineLayout::collectTextAbsoluteRects):
3898         (WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
3899         
3900             Add these.
3901
3902         * rendering/SimpleLineLayoutFunctions.h:
3903         * rendering/SimpleLineLayoutResolver.h:
3904         (WebCore::SimpleLineLayout::RunResolver::Run::start):
3905         (WebCore::SimpleLineLayout::RunResolver::Run::end):
3906         
3907             For future use.
3908
3909 2013-11-15  Radu Stavila  <stavila@adobe.com>
3910
3911         [CSS Regions] Implement visual overflow for first & last regions
3912         https://bugs.webkit.org/show_bug.cgi?id=118665
3913
3914         In order to properly propagate the visual overflow of elements flowed inside regions, 
3915         the responsiblity of painting and hit-testing content inside flow threads has been
3916         moved to the flow thread layer's level.
3917         Each region keeps the associated overflow with each box in the RenderBoxRegionInfo
3918         structure, including one for the flow thread itself. This data is used during
3919         painting and hit-testing.
3920
3921         Reviewed by David Hyatt.
3922
3923         Tests: fast/regions/overflow-first-and-last-regions-in-container-hidden.html
3924                fast/regions/overflow-first-and-last-regions.html
3925                fast/regions/overflow-nested-regions.html
3926                fast/regions/overflow-region-float.html
3927                fast/regions/overflow-region-inline.html
3928                fast/regions/overflow-region-transform.html
3929
3930         * rendering/InlineFlowBox.cpp:
3931         (WebCore::InlineFlowBox::setLayoutOverflow):
3932         (WebCore::InlineFlowBox::setVisualOverflow):
3933         * rendering/InlineFlowBox.h:
3934         * rendering/RenderBlock.cpp:
3935         (WebCore::RenderBlock::addOverflowFromChildren):
3936         (WebCore::RenderBlock::paint):
3937         (WebCore::RenderBlock::paintObject):
3938         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
3939         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
3940         * rendering/RenderBlockFlow.cpp:
3941         (WebCore::RenderBlockFlow::hasNextPage):
3942         (WebCore::RenderBlockFlow::relayoutForPagination):
3943         * rendering/RenderBlockLineLayout.cpp:
3944         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
3945         * rendering/RenderBox.cpp:
3946         (WebCore::RenderBox::borderBoxRectInRegion):
3947         (WebCore::RenderBox::computeRectForRepaint):
3948         (WebCore::RenderBox::addLayoutOverflow):
3949         (WebCore::RenderBox::addVisualOverflow):
3950         (WebCore::RenderBox::isUnsplittableForPagination):
3951         (WebCore::RenderBox::overflowRectForPaintRejection):
3952         * rendering/RenderBox.h:
3953         (WebCore::RenderBox::canHaveOutsideRegionRange):
3954         * rendering/RenderBoxModelObject.cpp:
3955         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
3956         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3957         * rendering/RenderBoxModelObject.h:
3958         * rendering/RenderBoxRegionInfo.h:
3959         (WebCore::RenderBoxRegionInfo::createOverflow):
3960         * rendering/RenderFlowThread.cpp:
3961         (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
3962         (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
3963         (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
3964         (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
3965         (WebCore::RenderFlowThread::flipForWritingModeLocalCoordinates):
3966         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
3967         (WebCore::RenderFlowThread::addRegionsVisualOverflow):
3968         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
3969         * rendering/RenderFlowThread.h:
3970         * rendering/RenderLayer.cpp:
3971         (WebCore::RenderLayer::updateLayerPositions):
3972         (WebCore::expandClipRectForRegionAndReflection):
3973         (WebCore::expandClipRectForDescendantsAndReflection):
3974         (WebCore::RenderLayer::paintLayer):
3975         (WebCore::RenderLayer::paintLayerContents):
3976         (WebCore::RenderLayer::updatePaintingInfoForFragments):
3977         (WebCore::RenderLayer::paintForegroundForFragments):
3978         (WebCore::RenderLayer::hitTest):
3979         (WebCore::RenderLayer::hitTestLayer):
3980         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
3981         (WebCore::RenderLayer::calculateClipRects):
3982         (WebCore::RenderLayer::parentClipRects):
3983         (WebCore::RenderLayer::calculateRects):
3984         (WebCore::RenderLayer::intersectsDamageRect):
3985         (WebCore::RenderLayer::updateDescendantsLayerListsIfNeeded):
3986         (WebCore::RenderLayer::repaintIncludingDescendants):
3987         (WebCore::RenderLayer::paintNamedFlowThreadInsideRegion):
3988         (WebCore::RenderLayer::paintFlowThreadIfRegion):
3989         (WebCore::RenderLayer::hitTestFlowThreadIfRegion):
3990         * rendering/RenderLayer.h:
3991         (WebCore::ClipRect::inflateX):
3992         (WebCore::ClipRect::inflateY):
3993         (WebCore::ClipRect::inflate):
3994         * rendering/RenderLayerCompositor.cpp:
3995         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3996         * rendering/RenderListItem.cpp:
3997         (WebCore::RenderListItem::addOverflowFromChildren):
3998         * rendering/RenderMultiColumnSet.cpp:
3999         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
4000         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
4001         * rendering/RenderMultiColumnSet.h:
4002         * rendering/RenderNamedFlowFragment.cpp:
4003         (WebCore::RenderNamedFlowFragment::createStyle):
4004         (WebCore::RenderNamedFlowFragment::namedFlowThread):
4005         * rendering/RenderNamedFlowFragment.h:
4006         * rendering/RenderOverflow.h:
4007         * rendering/RenderRegion.cpp:
4008         (WebCore::RenderRegion::flowThreadPortionOverflowRect):
4009         (WebCore::RenderRegion::flowThreadPortionLocation):
4010         (WebCore::RenderRegion::regionContainerLayer):
4011         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
4012         (WebCore::RenderRegion::computeOverflowFromFlowThread):
4013         (WebCore::RenderRegion::repaintFlowThreadContent):
4014         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
4015         (WebCore::RenderRegion::insertedIntoTree):
4016         (WebCore::RenderRegion::ensureOverflowForBox):
4017         (WebCore::RenderRegion::rectFlowPortionForBox):
4018         (WebCore::RenderRegion::addLayoutOverflowForBox):
4019         (WebCore::RenderRegion::addVisualOverflowForBox):
4020         (WebCore::RenderRegion::layoutOverflowRectForBox):
4021         (WebCore::RenderRegion::visualOverflowRectForBox):
4022         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
4023         * rendering/RenderRegion.h:
4024         * rendering/RenderReplaced.cpp:
4025         (WebCore::RenderReplaced::shouldPaint):
4026         * rendering/RootInlineBox.cpp:
4027         (WebCore::RootInlineBox::paint):
4028
4029 2013-11-15  Stephane Jadaud  <sjadaud@sii.fr>
4030
4031         [GStreamer] Add support for Media Source API
4032         https://bugs.webkit.org/show_bug.cgi?id=99065
4033
4034         The patch integrate a Media Source player for the GStreamer backend. The implementented architecture is:
4035         - MediaPlayerPrivateGStreamer engine is modified to support Media Source URIs (change blob:// to mediasourceblob://), in addition to the existing support for web (http/https/blob) URIs
4036         - Similar to the existing WebKitWebSrc gstreamer element that handles web URIs, a new gstreamer element named WebKitMediaSrc is implemented to handle Media Source URIs
4037         - WebKitMediaSrc registers its URI protocol handler, allowing uridecodebin to dynamically create the appropriate source element.
4038         - The WebKitMediaSrc element creates a bin with 2 appsrc: One for Audio and One for Video. Pads are dynamically linked at the reception of first video and audio buffers.
4039
4040         Reviewed by Philippe Normand.
4041
4042         Tests: Activate http/tests/media/media-source and media/media-source tests
4043
4044         * GNUmakefile.am:
4045         * GNUmakefile.list.am:
4046         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
4047         (WebCore::initializeGStreamerAndRegisterWebKitElements):
4048         (WebCore::MediaPlayerPrivateGStreamer::load):
4049         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
4050         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp: Added.
4051         (WebCore::MediaSourceGStreamer::open):
4052         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
4053         (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer):