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