GraphicsContext::drawImageBuffer is inefficient
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-07  Stephen Chenney  <schenney@chromium.org>
2
3         GraphicsContext::drawImageBuffer is inefficient
4         https://bugs.webkit.org/show_bug.cgi?id=104367
5
6         Reviewed by Dirk Schulze.
7
8         This patch converts all of the drawImage and drawImageBuffer
9         convenience methods (those that take parameters of various types) to
10         invoke the implementing method (that takes FloatRect src and dest)
11         directly, rather than through the next-most-convenient method as was
12         done previously. This will knock some layers off the stack compared
13         to the existing code, and may remove one or two constructor invocations.
14         This may be slightly more efficient, and also makes debugging simpler.
15
16         Also removes the unused drawImage method that takes and IntRect source
17         area and IntRect destination. It is not invoked anywhere in a standard
18         WebKit checkout.
19
20         No new tests. No change in functionality, just refactoring.
21
22         * platform/graphics/GraphicsContext.cpp:
23         (WebCore::GraphicsContext::drawImage): Modify all the convenience versions to call
24         the implementing version directly.
25         (WebCore::GraphicsContext::drawImageBuffer): Modify all the convenience versions
26         to call the implementing version directly.
27         * platform/graphics/GraphicsContext.h:
28         (GraphicsContext): Remove IntRect, IntRect version of drawImage.
29
30 2013-02-07  Kent Tamura  <tkent@chromium.org>
31
32         Conversion from localized numbers to HTML numbers should accept not only localized numbers but also HTML numbers
33         https://bugs.webkit.org/show_bug.cgi?id=109160
34
35         Reviewed by Kentaro Hara.
36
37         For example, A French user needs to specify a number to a number input
38         field. He might use a local decimal point, like 3,141592, or he might
39         use the standard decimal point like 3.141592. We had better accept both
40         of them.
41
42         We accepted both last year, but we changed the behavior so that we
43         accept only localized numbers because we had some cases where an input
44         string can be recognized as both of a localized number and the standard
45         number. e.g. 3.141 is 3141 in French locale and 3.141 in the
46         standard. Now we introduce a simple rule that we don't accept group
47         separator at all. So users won't confuse even if we accept both of
48         decimal points.
49
50         Test: fast/forms/number/number-l10n-input.html
51
52         * platform/text/PlatformLocale.cpp:
53         (WebCore::Locale::convertFromLocalizedNumber):
54         If the specified string contains invalid characters including group
55         separators, just return the specified string.
56
57 2013-02-07  Xiaobo Wang  <xbwang@torchmobile.com.cn>
58
59         [BlackBerry] CHHW - Characters that are using 32 bits encoding get trunked to 16bits
60         https://bugs.webkit.org/show_bug.cgi?id=109126
61         PR 292540
62
63         Reviewed by Yong Li.
64
65         Change char code to 4 bytes.
66         Need to convert UTF32 key char to UTF16 before constructing a WTF::String.
67
68         * platform/PlatformKeyboardEvent.h:
69         (WebCore::PlatformKeyboardEvent::unmodifiedCharacter):
70         (PlatformKeyboardEvent):
71         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
72         (WebCore::keyIdentifierForBlackBerryCharacter):
73         (WebCore::windowsKeyCodeForBlackBerryCharacter):
74         (WebCore::adjustCharacterFromOS):
75         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
76
77 2013-02-07  Mike West  <mkwst@chromium.org>
78
79         Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro.
80         https://bugs.webkit.org/show_bug.cgi?id=109044
81
82         Reviewed by Darin Adler.
83
84         The pattern:
85
86             ExceptionCode ec = 0;
87             methodThatGeneratesException(ec);
88             ASSERT(!ec);
89
90         is more clearly and succinctly written as:
91
92             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
93
94         This patch replaces the occurances of the former that never touch 'ec'
95         again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
96         a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
97         where it does indeed matter that 'ec' get set properly.
98
99         No change in behavior should result from this refactoring.
100
101         * Modules/indexeddb/IDBCursor.cpp:
102         (WebCore::IDBCursor::direction):
103         * Modules/indexeddb/IDBObjectStore.cpp:
104         (WebCore):
105         * Modules/indexeddb/IDBTransaction.cpp:
106         (WebCore::IDBTransaction::mode):
107         * dom/ContainerNode.cpp:
108         (WebCore::ContainerNode::takeAllChildrenFrom):
109         * dom/Document.cpp:
110         (WebCore::Document::setTitle):
111         * dom/MessagePort.cpp:
112         (WebCore::MessagePort::dispatchMessages):
113         (WebCore::MessagePort::disentanglePorts):
114         * editing/DeleteButtonController.cpp:
115         (WebCore::enclosingDeletableElement):
116         (WebCore::DeleteButtonController::createDeletionUI):
117             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
118         (WebCore::DeleteButtonController::show):
119             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
120         * editing/EditorCommand.cpp:
121         (WebCore::unionDOMRanges):
122         * editing/ReplaceNodeWithSpanCommand.cpp:
123         (WebCore::swapInNodePreservingAttributesAndChildren):
124         * editing/ReplaceSelectionCommand.cpp:
125         (WebCore::ReplacementFragment::ReplacementFragment):
126         (WebCore::ReplacementFragment::removeNode):
127         (WebCore::ReplacementFragment::insertNodeBefore):
128         (WebCore::ReplacementFragment::insertFragmentForTestRendering):
129         (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
130         (WebCore::ReplaceSelectionCommand::insertAsListItems):
131         * editing/SplitTextNodeCommand.cpp:
132         (WebCore::SplitTextNodeCommand::doUnapply):
133         * editing/TextIterator.cpp:
134         (WebCore::CharacterIterator::range):
135         (WebCore::BackwardsCharacterIterator::range):
136         (WebCore::TextIterator::rangeFromLocationAndLength):
137         (WebCore::collapsedToBoundary):
138         * editing/htmlediting.cpp:
139         (WebCore::createTabSpanElement):
140         * editing/mac/EditorMac.mm:
141         (WebCore::Editor::fontForSelection):
142         (WebCore::Editor::fontAttributesForSelectionStart):
143         * editing/markup.cpp:
144         (WebCore::createMarkup):
145         (WebCore::trimFragment):
146         (WebCore::createFragmentFromMarkupWithContext):
147         (WebCore::fillContainerFromString):
148         (WebCore::createFragmentFromText):
149         (WebCore::createFragmentFromNodes):
150         * html/ColorInputType.cpp:
151         (WebCore::ColorInputType::createShadowSubtree):
152             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
153         * html/HTMLOptionsCollection.cpp:
154         (WebCore::HTMLOptionsCollection::add):
155             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
156         * html/HTMLTextAreaElement.cpp:
157         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
158         * html/HTMLTextFormControlElement.cpp:
159         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
160         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
161         * html/TextFieldInputType.cpp:
162         (WebCore::TextFieldInputType::updatePlaceholderText):
163         * html/ValidationMessage.cpp:
164         (WebCore::ValidationMessage::buildBubbleTree):
165         * html/shadow/MediaControlElementTypes.cpp:
166         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
167         * inspector/InspectorPageAgent.cpp:
168         (WebCore::InspectorPageAgent::getCookies):
169         * inspector/InspectorStyleSheet.cpp:
170         (WebCore::InspectorStyleSheet::addRule):
171         * loader/appcache/ApplicationCacheHost.cpp:
172         (WebCore::ApplicationCacheHost::dispatchDOMEvent):
173         * page/DOMSelection.cpp:
174         (WebCore::DOMSelection::deleteFromDocument):
175         * page/DragController.cpp:
176         (WebCore::prepareClipboardForImageDrag):
177         * rendering/RenderTextControl.cpp:
178         (WebCore::RenderTextControl::visiblePositionForIndex):
179         * rendering/style/SVGRenderStyle.h:
180         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
181         (WebCore::SVGRenderStyle::initialKerning):
182         (WebCore::SVGRenderStyle::initialStrokeDashOffset):
183         (WebCore::SVGRenderStyle::initialStrokeWidth):
184         * svg/SVGAnimatedLength.cpp:
185         (WebCore::sharedSVGLength):
186         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
187         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
188         * svg/SVGAnimatedLengthList.cpp:
189         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
190         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
191         * svg/SVGLength.cpp:
192         (WebCore::SVGLength::SVGLength):
193         * svg/SVGTextContentElement.cpp:
194         (WebCore::SVGTextContentElement::textLengthAnimated):
195         * svg/animation/SVGSMILElement.cpp:
196         (WebCore::constructQualifiedName):
197             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
198
199 2013-02-07  Mary Wu  <mary.wu@torchmobile.com.cn>
200
201         [BlackBerry] Export mimeType in NetworkJob
202         https://bugs.webkit.org/show_bug.cgi?id=109002
203
204         Reviewed by Yong Li.
205
206         NetworkJob will analysize resource mimetype and set it to resourceResponse,
207         we will pass it on to be used by other Streams like download stream.
208
209         RIM bug# 284408, internally reviewed by Liam Quinn.
210
211         * platform/network/blackberry/NetworkJob.cpp:
212         (WebCore::NetworkJob::mimeType):
213         (WebCore):
214         * platform/network/blackberry/NetworkJob.h:
215         (NetworkJob):
216
217 2013-02-07  Peter Rybin  <prybin@chromium.org>
218
219         Web Inspector: support JavaScript variable mutation in protocol and V8 bindings
220         https://bugs.webkit.org/show_bug.cgi?id=107829
221
222         A new command is added to protocol description and the call is passed through
223         debugger agent through injected script and debugger script down to V8 mirror
224         API. JSC bindings got a thorw exception stub.
225
226         Only declarative JavaScript scopes are supported (local, closure, catch). Other
227         scopes (global, with) are not supported by V8 and not supported by protocol, because
228         manual approach (direct property assigment) is available for them in form of evaluate
229         commands and is more desirable because of a complex nature of operation (it can throw
230         exception in several cases such as exception in setter function).
231
232         Reviewed by Pavel Feldman.
233
234         Test: inspector-protocol/debugger-setVariableValue.html
235
236         * bindings/js/JSInjectedScriptHostCustom.cpp:
237         (WebCore::JSInjectedScriptHost::setFunctionVariableValue):
238         (WebCore):
239         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
240         (WebCore::JSJavaScriptCallFrame::setVariableValue):
241         (WebCore):
242         * bindings/v8/DebuggerScript.js:
243         (.):
244         * bindings/v8/JavaScriptCallFrame.cpp:
245         (WebCore::JavaScriptCallFrame::setVariableValue):
246         (WebCore):
247         * bindings/v8/JavaScriptCallFrame.h:
248         (JavaScriptCallFrame):
249         * bindings/v8/ScriptDebugServer.cpp:
250         (WebCore::ScriptDebugServer::setFunctionVariableValue):
251         (WebCore):
252         * bindings/v8/ScriptDebugServer.h:
253         (ScriptDebugServer):
254         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
255         (WebCore::V8InjectedScriptHost::setFunctionVariableValueCallback):
256         (WebCore):
257         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
258         (WebCore::V8JavaScriptCallFrame::setVariableValueCallback):
259         (WebCore):
260         * inspector/InjectedScript.cpp:
261         (WebCore::InjectedScript::setVariableValue):
262         (WebCore):
263         * inspector/InjectedScript.h:
264         (InjectedScript):
265         * inspector/InjectedScriptHost.idl:
266         * inspector/InjectedScriptSource.js:
267         (.):
268         * inspector/Inspector.json:
269         * inspector/InspectorDebuggerAgent.cpp:
270         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
271         (WebCore::InspectorDebuggerAgent::setVariableValue):
272         (WebCore):
273         * inspector/InspectorDebuggerAgent.h:
274         (InspectorDebuggerAgent):
275         * inspector/JavaScriptCallFrame.idl:
276
277 2013-02-07  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
278
279         [CoordinatedGraphics] Use ScrollingCoordinator to track fixed layers
280         https://bugs.webkit.org/show_bug.cgi?id=108990
281
282         Reviewed by Noam Rosenthal.
283
284         WebCore keeps ScrollingCoordinator up-to-date about whether layers are fixed or not, so we
285         don't need to traverse the tree every frame to get this information.
286
287         The function ScrollingCoordinator::setLayerIsFixedToContainerLayer() is called when
288         RenderLayerBacking is updating its graphics layers.
289
290         The new code also works in new situations where the previous was broken: if a layer changed
291         from being fixed to not fixed (but still kept as a layer for other reasons), the layer will
292         be correctly updated. Previous implementation only had logic to mark layers as fixed, but
293         not the other way round. A manual test was added to illustrate the solved problem.
294
295         Testing was done with the existing manual tests that make use of "position:fixed". Automatic
296         tests are mostly not affected by this because usage of this information affects only the
297         UseFixedLayout mode, not used by default in WebKitTestRunner. Work to improve this situation
298         will be tracked in bug https://bugs.webkit.org/show_bug.cgi?id=109175.
299
300         * CMakeLists.txt:
301         * Target.pri:
302         * WebCore.pri:
303         * page/scrolling/ScrollingCoordinator.cpp:
304         (WebCore::ScrollingCoordinator::create): create specific version of ScrollingCoordinator.
305         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Added.
306         (WebCore):
307         (WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
308         (WebCore::ScrollingCoordinatorCoordinatedGraphics::setLayerIsFixedToContainerLayer):
309         update layer information using existing hook in ScrollingCoordinator.
310         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Added.
311         (WebCore):
312         (ScrollingCoordinatorCoordinatedGraphics):
313         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
314         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport): now that setting viewport is not
315         embedded in the synchronization work, we need to mark the layer so it is updated in the
316         next frame.
317         (WebCore):
318         (WebCore::CoordinatedGraphicsLayer::flushCompositingState): remove call to syncFixedLayers().
319         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
320         (CoordinatedGraphicsLayerClient): remove now unused syncFixedLayers() from client.
321         (CoordinatedGraphicsLayer):
322
323 2013-02-07  Keishi Hattori  <keishi@webkit.org>
324
325         REGRESSION (r140778): Calendar Picker doesn't open when the element has the required attribute
326         https://bugs.webkit.org/show_bug.cgi?id=109136
327
328         Reviewed by Kent Tamura.
329
330         Calendar picker was using the "Clear" button to calculate the window width.
331         Since it doesn't exist when the input element has a required attribute,
332         it was throwing an error. This patch fixes the width calculating logic.
333
334         Tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html
335                platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required.html
336
337         * Resources/pagepopups/calendarPicker.css:
338         (.today-clear-area):
339         * Resources/pagepopups/calendarPicker.js:
340         (CalendarPicker.prototype.fixWindowSize): Fixing the logic to calculate
341         the width. We don't want to use clear button because it doesn't exist
342         when a value is required.
343
344 2013-02-07  Gustavo Noronha Silva  <gns@gnome.org>
345
346         Unreviewed build fix. libWebCore.la needs to be relinked when
347         symbols.filter changes.
348
349         * GNUmakefile.am: add symbols.filter as a dependency for the
350         libWebCore.la library.
351
352 2013-02-07  Vsevolod Vlasov  <vsevik@chromium.org>
353
354         Web Inspector: Closure compilation fixes
355         https://bugs.webkit.org/show_bug.cgi?id=109131
356
357         Reviewed by Yury Semikhatsky.
358
359         * inspector/front-end/ElementsPanel.js:
360         (WebInspector.ElementsPanel):
361         * inspector/front-end/FileSystemMapping.js:
362         (WebInspector.FileSystemMappingImpl.prototype.uriPrefixForPathPrefix):
363         * inspector/front-end/IsolatedFileSystemModel.js:
364         (WebInspector.IsolatedFileSystemModel.prototype._fileSystemRemoved):
365         * inspector/front-end/SidebarPane.js:
366
367 2013-02-07  Kentaro Hara  <haraken@chromium.org>
368
369         Unreviewed, rolling out r142077.
370         http://trac.webkit.org/changeset/142077
371         https://bugs.webkit.org/show_bug.cgi?id=108579
372
373         fast/filesystem/workers/file-writer-empty-blob.html is broken
374
375         * bindings/v8/DOMDataStore.h:
376         (WebCore::DOMDataStore::setWrapperInObject):
377         * bindings/v8/DOMWrapperWorld.h:
378         (DOMWrapperWorld):
379         (WebCore::DOMWrapperWorld::isolated):
380         * bindings/v8/V8Binding.h:
381         (WebCore):
382         (WebCore::worldForEnteredContextIfIsolated):
383         * bindings/v8/V8DOMWindowShell.cpp:
384         (WebCore::V8DOMWindowShell::initializeIfNeeded):
385         * bindings/v8/V8GCController.cpp:
386         (WebCore::WrapperVisitor::WrapperVisitor):
387         (WebCore):
388         (WebCore::gcTree):
389         (WebCore::V8GCController::didCreateWrapperForNode):
390         (WebCore::V8GCController::gcPrologue):
391         (WebCore::V8GCController::minorGCPrologue):
392         (WebCore::V8GCController::majorGCPrologue):
393         * bindings/v8/V8GCController.h:
394         (V8GCController):
395
396 2013-02-07  Tony Gentilcore  <tonyg@chromium.org>
397
398         Call XSSAuditor.filterToken() from threaded HTML parser
399         https://bugs.webkit.org/show_bug.cgi?id=107603
400
401         Reviewed by Adam Barth.
402
403         With this patch we now pass 180 of 182 tests in http/tests/security/xssAuditor.
404
405         We do this by creating aan XSSAuditor on the main thread and passing ownership of them to the BackgroundHTMLParser upon its creation.
406
407         Then the background thread calls filterToken() and stores the resulting XSSInfo (if any) on the CompactHTMLToken for the main thread to handle.
408
409         This involved trimming the XSSAuditor to only depend on the TextEncoding instead of the whole TextResourceDecoder.
410
411         No new tests because covered by existing tests.
412
413         * html/parser/BackgroundHTMLParser.cpp:
414         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
415         (WebCore::BackgroundHTMLParser::pumpTokenizer):
416         (WebCore::BackgroundHTMLParser::createPartial):
417         * html/parser/BackgroundHTMLParser.h:
418         (WebCore):
419         (WebCore::BackgroundHTMLParser::create):
420         (BackgroundHTMLParser):
421         * html/parser/HTMLDocumentParser.cpp:
422         (WebCore::HTMLDocumentParser::pumpTokenizer):
423         (WebCore::HTMLDocumentParser::startBackgroundParser):
424         * html/parser/HTMLSourceTracker.cpp:
425         (WebCore::HTMLSourceTracker::start):
426         (WebCore::HTMLSourceTracker::end):
427         * html/parser/HTMLSourceTracker.h: Change the HTMLInputStream args to SegmentedString because the background thread only has a BackgroundHTMLInputStream.
428         (HTMLSourceTracker):
429         * html/parser/HTMLViewSourceParser.cpp:
430         (WebCore::HTMLViewSourceParser::pumpTokenizer):
431         * html/parser/XSSAuditor.cpp:
432         (WebCore::fullyDecodeString):
433         (WebCore::XSSAuditor::XSSAuditor):
434         (WebCore::XSSAuditor::init): Copies necessary to make isSafeToSendToAnotherThread() happy.
435         (WebCore::XSSAuditor::decodedSnippetForName):
436         (WebCore::XSSAuditor::decodedSnippetForAttribute):
437         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
438         (WebCore::XSSAuditor::isSafeToSendToAnotherThread): Check that all String and KURL members are safe to send to another thread.
439         (WebCore):
440         * html/parser/XSSAuditor.h:
441         (WebCore):
442         (WebCore::FilterTokenRequest::FilterTokenRequest):
443         (FilterTokenRequest):
444         (XSSAuditor):
445
446 2013-02-07  ChangSeok Oh  <shivamidow@gmail.com>
447
448         [GTK][AC] Implement opacity animation with clutter ac backend
449         https://bugs.webkit.org/show_bug.cgi?id=108961
450
451         Reviewed by Gustavo Noronha Silva.
452
453         Implement opacity animation with clutter ac backend.
454         Almost all implementations of GraphicsLayerClutter are based on mac port's one.
455         PlatformClutterAnimation interfaces are also similar with mac port, but they are implemented
456         with native clutter APIs.
457         This patch includes only opacity animation related changes, so many APIs might be empty.
458         Remained animations like rotation and translate will be dealt in another patches.
459
460         Covered by existing animation tests.
461
462         * GNUmakefile.list.am:
463         * platform/graphics/clutter/GraphicsLayerActor.cpp:
464         (graphicsLayerActorGetAnimationForKey):
465         * platform/graphics/clutter/GraphicsLayerActor.h:
466         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
467         (WebCore):
468         (WebCore::propertyIdToString):
469         (WebCore::animationIdentifier):
470         (WebCore::animationHasStepsTimingFunction):
471         (WebCore::GraphicsLayerClutter::setOpacity):
472         (WebCore::GraphicsLayerClutter::updateAnimations):
473         (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
474         (WebCore::GraphicsLayerClutter::setupAnimation):
475         (WebCore::GraphicsLayerClutter::timingFunctionForAnimationValue):
476         (WebCore::GraphicsLayerClutter::createBasicAnimation):
477         (WebCore::GraphicsLayerClutter::createKeyframeAnimation):
478         (WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
479         (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
480         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
481         (WebCore::GraphicsLayerClutter::createAnimationFromKeyframes):
482         (WebCore::GraphicsLayerClutter::addAnimation):
483         (WebCore::GraphicsLayerClutter::removeClutterAnimationFromLayer):
484         (WebCore::GraphicsLayerClutter::pauseClutterAnimationOnLayer):
485         (WebCore::GraphicsLayerClutter::setAnimationOnLayer):
486         (WebCore::GraphicsLayerClutter::setAnimationEndpoints):
487         (WebCore::GraphicsLayerClutter::setAnimationKeyframes):
488         (WebCore::GraphicsLayerClutter::animatedLayer):
489         * platform/graphics/clutter/GraphicsLayerClutter.h:
490         (GraphicsLayerClutter):
491         (WebCore::GraphicsLayerClutter::LayerPropertyAnimation::LayerPropertyAnimation):
492         (LayerPropertyAnimation):
493         (WebCore::GraphicsLayerClutter::AnimationProcessingAction::AnimationProcessingAction):
494         (AnimationProcessingAction):
495         * platform/graphics/clutter/PlatformClutterAnimation.cpp: Added.
496         (WebCore):
497         (WebCore::timelineStartedCallback):
498         (WebCore::toClutterAnimationMode):
499         (WebCore::PlatformClutterAnimation::stringToAnimatedPropertyType):
500         (WebCore::PlatformClutterAnimation::create):
501         (WebCore::PlatformClutterAnimation::PlatformClutterAnimation):
502         (WebCore::PlatformClutterAnimation::~PlatformClutterAnimation):
503         (WebCore::PlatformClutterAnimation::supportsValueFunction):
504         (WebCore::PlatformClutterAnimation::beginTime):
505         (WebCore::PlatformClutterAnimation::setBeginTime):
506         (WebCore::PlatformClutterAnimation::duration):
507         (WebCore::PlatformClutterAnimation::setDuration):
508         (WebCore::PlatformClutterAnimation::speed):
509         (WebCore::PlatformClutterAnimation::setSpeed):
510         (WebCore::PlatformClutterAnimation::timeOffset):
511         (WebCore::PlatformClutterAnimation::setTimeOffset):
512         (WebCore::PlatformClutterAnimation::repeatCount):
513         (WebCore::PlatformClutterAnimation::setRepeatCount):
514         (WebCore::PlatformClutterAnimation::autoreverses):
515         (WebCore::PlatformClutterAnimation::setAutoreverses):
516         (WebCore::PlatformClutterAnimation::fillMode):
517         (WebCore::PlatformClutterAnimation::setFillMode):
518         (WebCore::PlatformClutterAnimation::setTimingFunction):
519         (WebCore::PlatformClutterAnimation::copyTimingFunctionFrom):
520         (WebCore::PlatformClutterAnimation::isRemovedOnCompletion):
521         (WebCore::PlatformClutterAnimation::setRemovedOnCompletion):
522         (WebCore::PlatformClutterAnimation::isAdditive):
523         (WebCore::PlatformClutterAnimation::setAdditive):
524         (WebCore::PlatformClutterAnimation::valueFunction):
525         (WebCore::PlatformClutterAnimation::setValueFunction):
526         (WebCore::PlatformClutterAnimation::setFromValue):
527         (WebCore::PlatformClutterAnimation::copyFromValueFrom):
528         (WebCore::PlatformClutterAnimation::setToValue):
529         (WebCore::PlatformClutterAnimation::copyToValueFrom):
530         (WebCore::PlatformClutterAnimation::setValues):
531         (WebCore::PlatformClutterAnimation::copyValuesFrom):
532         (WebCore::PlatformClutterAnimation::setKeyTimes):
533         (WebCore::PlatformClutterAnimation::copyKeyTimesFrom):
534         (WebCore::PlatformClutterAnimation::setTimingFunctions):
535         (WebCore::PlatformClutterAnimation::copyTimingFunctionsFrom):
536         (WebCore::PlatformClutterAnimation::animationDidStart):
537         (WebCore::PlatformClutterAnimation::timeline):
538         (WebCore::PlatformClutterAnimation::addOpacityTransition):
539         (WebCore::PlatformClutterAnimation::addAnimationForKey):
540         (WebCore::PlatformClutterAnimation::removeAnimationForKey):
541         * platform/graphics/clutter/PlatformClutterAnimation.h: Added.
542         (WebCore):
543         (PlatformClutterAnimation):
544         (WebCore::PlatformClutterAnimation::animationType):
545
546 2013-02-07  Andrey Lushnikov  <lushnikov@chromium.org>
547
548         Web Inspector: highlight matching braces in DTE.
549         https://bugs.webkit.org/show_bug.cgi?id=108697
550
551         Reviewed by Pavel Feldman.
552
553         Implement BraceMatcher class which for given position in textModel
554         will respond with enclosing brace pair for that position.
555         Make use of this class in DefaultTextEditor by handling
556         selectionChange event. Make use of this class in "_closingBlockOffset"
557         method of TextEditorMainPanel as this method implements similar
558         functionality.
559
560         New test: inspector/editor/brace-matcher.html
561
562         * inspector/front-end/DefaultTextEditor.js:
563         (WebInspector.TextEditorMainPanel):
564         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
565         (WebInspector.TextEditorMainPanel.prototype._closingBlockOffset):
566         (WebInspector.TextEditorMainPanel.prototype._handleSelectionChange):
567         (WebInspector.TextEditorMainPanel.BraceHighlightController):
568         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
569         * inspector/front-end/TextEditorHighlighter.js:
570         (WebInspector.TextEditorHighlighter.prototype._highlightLines):
571         * inspector/front-end/TextEditorModel.js:
572         (WebInspector.TextEditorModel.endsWithBracketRegex):
573         (WebInspector.TextEditorModel.endsWithBracketRegex.):
574         * inspector/front-end/textEditor.css:
575         (.text-editor-brace-match):
576
577 2013-02-05  Eunmi Lee  <eunmi15.lee@samsung.com> and Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
578
579         [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
580         https://bugs.webkit.org/show_bug.cgi?id=97173
581
582         Reviewed by Kenneth Rohde Christiansen, signed-off by Benjamin Poulain.
583
584         Remove codes to initialize and shutdown the EFL libraries from
585         RunLoopEfl.cpp. Initialization and shutdown will be done in the
586         ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web
587         process.
588
589         No new tests. This patch doesn't change behavior.
590
591         * platform/efl/RunLoopEfl.cpp:
592         (WebCore::RunLoop::RunLoop):
593         (WebCore::RunLoop::~RunLoop):
594
595 2013-02-07  Ilya Tikhonovsky  <loislo@chromium.org>
596
597         Unreviewed fix for inspector tests in debug.
598         m_frontend should be initialized in constructor.
599
600         * inspector/InspectorMemoryAgent.cpp:
601         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
602
603 2013-02-07  Yury Semikhatsky  <yurys@chromium.org>
604
605         Web Inspector: reduce number of native memory instrumentation categories
606         https://bugs.webkit.org/show_bug.cgi?id=109146
607
608         Reviewed by Pavel Feldman.
609
610         Merged some of memory instrumentation categories.
611
612         * dom/WebCoreMemoryInstrumentation.cpp:
613         (WebCore):
614         * inspector/front-end/NativeMemorySnapshotView.js:
615         (WebInspector.MemoryBlockViewProperties._initialize):
616         * platform/PlatformMemoryInstrumentation.cpp:
617         (WebCore):
618
619 2013-02-04  Kentaro Hara  <haraken@chromium.org>
620
621         [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
622         https://bugs.webkit.org/show_bug.cgi?id=108579
623
624         Reviewed by Adam Barth.
625
626         Currently V8GCController::m_edenNodes stores a list of nodes whose
627         wrappers have been created since the latest GC. The reason why we
628         needed m_edenNodes is that there was no way to know a list of wrappers
629         in the new space of V8. By using m_edenNodes, we had been approximating
630         'wrappers in the new space' by 'wrappers that have been created since
631         the latest GC'.
632
633         Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
634         can know a list of wrappers in the new space. By using the API, we can
635         remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
636         need to keep m_edenNodes and that (2) it enables more precise minor
637         DOM GC (Remember that m_edenNodes was just an approximation).
638
639         Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
640         The benchmark runs 300 iterations, each of which creates 100000 elements.
641         The benchmark measures average, min, median, max and stdev of execution times
642         of the 300 iterations. This will tell us the worst-case overhead of this change.
643
644         Before:
645           mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
646
647         After:
648           mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
649
650         As shown above, I couldn't observe any performance regression.
651
652         No tests. No change in behavior.
653
654         * bindings/v8/DOMDataStore.h:
655         (WebCore::DOMDataStore::setWrapperInObject):
656         * bindings/v8/DOMWrapperWorld.h:
657         (DOMWrapperWorld):
658         (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
659         * bindings/v8/V8Binding.h:
660         (WebCore):
661         (WebCore::worldForEnteredContextIfIsolated):
662         (WebCore::worldForEnteredContextWithoutContextCheck):
663         * bindings/v8/V8DOMWindowShell.cpp:
664         (WebCore::V8DOMWindowShell::initializeIfNeeded):
665         * bindings/v8/V8GCController.cpp:
666         (WebCore::gcTree):
667         (WebCore):
668         (MinorGCWrapperVisitor):
669         (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
670         (WebCore::MinorGCWrapperVisitor::notifyFinished):
671         (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
672         (WebCore::V8GCController::gcPrologue):
673         (WebCore::V8GCController::minorGCPrologue):
674         (WebCore::V8GCController::majorGCPrologue):
675         * bindings/v8/V8GCController.h:
676         (V8GCController):
677
678 2013-02-06  Kent Tamura  <tkent@chromium.org>
679
680         REGRESSION(r141195): INPUT_MULTIPLE_FIELDS_UI: Space in a placeholder string is removed
681         https://bugs.webkit.org/show_bug.cgi?id=109132
682
683         Reviewed by Hajime Morita.
684
685         <input  type=date> should be shown in Japanese UI as:
686         [ 年 /月/日]
687         But it is shown wrongly since r141195:
688         [年 /月/日]
689
690         We should use white-space:pre.
691
692         No new tests. This change is not testable in WebKit because this
693         requires a Japanese-localized UI string of Chromium.
694
695         * css/html.css:
696         (input::-webkit-datetime-edit-fields-wrapper):
697         Use white-space:pre instead of nowrap.
698
699 2013-02-06  Kentaro Hara  <haraken@chromium.org>
700
701         Remove DOMWindow::parseModalDialogFeatures()
702         https://bugs.webkit.org/show_bug.cgi?id=109139
703
704         Reviewed by Kent Tamura.
705
706         No one uses the method. FIXME is saying:
707
708           // FIXME: We can remove this function once V8 showModalDialog is changed to use DOMWindow.
709
710         Given that V8's showModalDialog() is now using DOMWindow, we can remove it.
711
712         No tests. No change in behavior.
713
714         * page/DOMWindow.cpp:
715         * page/DOMWindow.h:
716         (DOMWindow):
717
718 2013-02-06  Ilya Tikhonovsky  <loislo@chromium.org>
719
720         Web Inspector: Native Memory Instrumentation: reduce native heap snapshot runtime memory footprint
721         https://bugs.webkit.org/show_bug.cgi?id=108824
722
723         Reviewed by Yury Semikhatsky.
724
725         New event was added into Memory domain addNativeSnapshotChunk.
726         The content of HeapGraphSerializer is completely rewritten according to new API.
727         Now it collects strings, nodes, edges and id2id map and pushes when the collected items count exceed a limit.
728         On the frontend side I added new method for the new event and fixed the postprocessing step.
729         MemoryInstrumentation was slightly changed. Now it reports base to real address map only after reporting the node with real address.
730
731         * inspector/HeapGraphSerializer.cpp:
732         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
733         (WebCore::HeapGraphSerializer::pushUpdateIfNeed):
734         (WebCore):
735         (WebCore::HeapGraphSerializer::pushUpdate):
736         (WebCore::HeapGraphSerializer::reportNode):
737         (WebCore::HeapGraphSerializer::reportNodeImpl):
738         (WebCore::HeapGraphSerializer::reportEdge):
739         (WebCore::HeapGraphSerializer::reportEdgeImpl):
740         (WebCore::HeapGraphSerializer::reportLeaf):
741         (WebCore::HeapGraphSerializer::reportBaseAddress):
742         (WebCore::HeapGraphSerializer::finish):
743         (WebCore::HeapGraphSerializer::reportMemoryUsage):
744         (WebCore::HeapGraphSerializer::addString):
745         (WebCore::HeapGraphSerializer::toNodeId):
746         (WebCore::HeapGraphSerializer::addRootNode):
747         * inspector/HeapGraphSerializer.h:
748         (HeapGraphSerializer):
749         * inspector/Inspector.json:
750         * inspector/InspectorController.cpp:
751         (WebCore::InspectorController::processMemoryDistribution):
752         * inspector/InspectorMemoryAgent.cpp:
753         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionMap):
754         (WebCore):
755         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
756         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
757         (WebCore::InspectorMemoryAgent::setFrontend):
758         (WebCore::InspectorMemoryAgent::clearFrontend):
759         * inspector/InspectorMemoryAgent.h:
760         (InspectorMemoryAgent):
761         * inspector/front-end/NativeHeapSnapshot.js:
762         (WebInspector.NativeHeapSnapshot):
763         (WebInspector.NativeHeapSnapshotNode.prototype.classIndex):
764         (WebInspector.NativeHeapSnapshotNode.prototype.id):
765         (WebInspector.NativeHeapSnapshotNode.prototype.name):
766         (WebInspector.NativeHeapSnapshotNode.prototype.serialize):
767         * inspector/front-end/NativeMemorySnapshotView.js:
768         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
769         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked):
770         (WebInspector.NativeSnapshotProfileHeader):
771         (WebInspector.NativeSnapshotProfileHeader.prototype.startSnapshotTransfer):
772         (WebInspector.NativeSnapshotProfileHeader.prototype.addNativeSnapshotChunk):
773         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
774         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
775         (WebInspector.NativeMemoryBarChart.prototype._updateStats):
776         * inspector/front-end/ProfilesPanel.js:
777         (WebInspector.ProfilesPanel):
778         (WebInspector.MemoryDispatcher):
779         (WebInspector.MemoryDispatcher.prototype.addNativeSnapshotChunk):
780
781 2013-02-03  Kentaro Hara  <haraken@chromium.org>
782
783         WebKit's focus events are UIEvents (instead of FocusEvent) and thus don't expose .relatedTarget
784         https://bugs.webkit.org/show_bug.cgi?id=76216
785
786         Reviewed by Eric Seidel.
787
788         Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-FocusEvent
789
790         This patch creates a new FocusEvent class with a relatedTarget attribute.
791         Now when focusin or focusout events are dispatched, a FocusEvent is created with
792         the relatedTarget attribute set accordingly.
793
794         Test: fast/events/related-target-focusevent.html
795
796         * CMakeLists.txt:
797         * DerivedSources.cpp:
798         * DerivedSources.make:
799         * DerivedSources.pri:
800         * GNUmakefile.list.am:
801         * Target.pri:
802         * WebCore.gypi:
803         * WebCore.xcodeproj/project.pbxproj:
804         * dom/DOMAllInOne.cpp:
805         * dom/Event.cpp:
806         (WebCore::Event::isFocusEvent):
807         (WebCore):
808         * dom/Event.h:
809         (Event):
810         * dom/EventContext.cpp:
811         (WebCore::EventContext::handleLocalEvents):
812         * dom/EventNames.in:
813         * dom/FocusEvent.h: Added.
814         (WebCore):
815         (FocusEvent):
816         (WebCore::FocusEvent::create):
817         (WebCore::FocusEvent::relatedTarget):
818         (WebCore::FocusEvent::setRelatedTarget):
819         (WebCore::toFocusEvent):
820         * dom/FocusEvent.idl: Added.
821         * dom/Node.cpp:
822         (WebCore::Node::dispatchFocusInEvent):
823         (WebCore::Node::dispatchFocusOutEvent):
824
825 2013-02-06  Kent Tamura  <tkent@chromium.org>
826
827         Fix style of RenderTheme.cpp and RenderThemeChromiumWin.h
828         https://bugs.webkit.org/show_bug.cgi?id=109137
829
830         Reviewed by Kentaro Hara.
831
832         No new tests. Just style fix.
833
834         * rendering/RenderTheme.cpp:
835         (WebCore::RenderTheme::adjustStyle):
836         (WebCore::RenderTheme::paint):
837         (WebCore::RenderTheme::paintBorderOnly):
838         (WebCore::RenderTheme::paintDecorations):
839         (WebCore::RenderTheme::isControlStyled):
840         (WebCore::RenderTheme::adjustButtonStyle):
841         (WebCore::RenderTheme::systemColor):
842         * rendering/RenderThemeChromiumWin.h:
843         (WebCore::ThemeData::ThemeData):
844         (ThemeData):
845         (RenderThemeChromiumWin):
846         (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
847         (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
848
849 2013-02-06  Kent Tamura  <tkent@chromium.org>
850
851         Fix style of Chrome.h and Page.h
852         https://bugs.webkit.org/show_bug.cgi?id=109138
853
854         Reviewed by Ryosuke Niwa.
855
856         No new tests. Just style fixes.
857
858         * page/Chrome.h:
859         (WebCore):
860         (Chrome):
861         (WebCore::Chrome::client):
862         * page/Page.h:
863         (JSC):
864         (WebCore):
865         (WebCore::ArenaSize::ArenaSize):
866         (ArenaSize):
867         (Page):
868         (PageClients):
869         (WebCore::Page::theme):
870         (WebCore::Page::canStartMedia):
871         (WebCore::Page::editorClient):
872         (WebCore::Page::plugInClient):
873         (WebCore::Page::mainFrame):
874         (WebCore::Page::groupPtr):
875         (WebCore::Page::incrementSubframeCount):
876         (WebCore::Page::decrementSubframeCount):
877         (WebCore::Page::subframeCount):
878         (WebCore::Page::chrome):
879         (WebCore::Page::dragCaretController):
880         (WebCore::Page::dragController):
881         (WebCore::Page::focusController):
882         (WebCore::Page::contextMenuController):
883         (WebCore::Page::inspectorController):
884         (WebCore::Page::pointerLockController):
885         (WebCore::Page::validationMessageClient):
886         (WebCore::Page::settings):
887         (WebCore::Page::progress):
888         (WebCore::Page::backForward):
889         (WebCore::Page::featureObserver):
890         (WebCore::Page::viewMode):
891         (WebCore::Page::setTabKeyCyclesThroughElements):
892         (WebCore::Page::tabKeyCyclesThroughElements):
893         (WebCore::Page::scheduledRunLoopPairs):
894         (WebCore::Page::defersLoading):
895         (WebCore::Page::mediaVolume):
896         (WebCore::Page::pageScaleFactor):
897         (WebCore::Page::deviceScaleFactor):
898         (WebCore::Page::shouldSuppressScrollbarAnimations):
899         (WebCore::Page::pagination):
900         (WebCore::Page::isOnscreen):
901         (WebCore::Page::scriptedAnimationsSuspended):
902         (WebCore::Page::debugger):
903         (WebCore::Page::hasCustomHTMLTokenizerTimeDelay):
904         (WebCore::Page::customHTMLTokenizerTimeDelay):
905         (WebCore::Page::hasCustomHTMLTokenizerChunkSize):
906         (WebCore::Page::customHTMLTokenizerChunkSize):
907         (WebCore::Page::areMemoryCacheClientCallsEnabled):
908         (WebCore::Page::setEditable):
909         (WebCore::Page::isEditable):
910         (WebCore::Page::displayID):
911         (WebCore::Page::layoutMilestones):
912         (WebCore::Page::setIsPainting):
913         (WebCore::Page::isPainting):
914         (WebCore::Page::alternativeTextClient):
915         (WebCore::Page::checkSubframeCountConsistency):
916         (WebCore::Page::group):
917
918 2013-02-06  Mike West  <mkwst@chromium.org>
919
920         Entity-header extension headers honored on 304 responses.
921         https://bugs.webkit.org/show_bug.cgi?id=72414
922
923         Reviewed by Alexey Proskuryakov.
924
925         This patch ports Chromium's network stack logic governing header
926         updates after resource revalidation. Generally, headers sent with 304
927         responses ought to update the original cached resource's headers.
928         Certain headers should never be sent with 304 responses, and we should
929         ignore them if a misconfigured server sends them anyway.
930
931         Currently, WebCore ignores all headers prefixed with 'content-'. This
932         patch adds 'x-content-' and 'x-webkit-' to the list, as well as specific
933         headers like 'upgrade', 'trailer', and others that the Chromium network
934         stack currently ignores.
935
936         The tests verify that those headers with visible effect are correctly
937         handled: 'x-frame-options', 'content-security-policy', and
938         'x-xss-protection'.
939
940         Tests: http/tests/security/XFrameOptions/x-frame-options-cached.html
941                http/tests/security/contentSecurityPolicy/cached-frame-csp.html
942                http/tests/security/xssAuditor/cached-frame.html
943
944         * loader/cache/CachedResource.cpp:
945         (WebCore):
946         (WebCore::CachedResource::updateResponseAfterRevalidation):
947             This patch adds two arrays containing the specific headers to
948             ignore and the prefixes to ignore. These lists are processed in
949             shouldUpdateHeaderAfterRevalidation.
950             CachedResource::updateResponseAfterRevalidation relies on this new
951             method when processing revalidated resources.
952
953         * loader/cache/CachedResource.cpp:
954         (WebCore):
955         (WebCore::shouldUpdateHeaderAfterRevalidation):
956         (WebCore::CachedResource::updateResponseAfterRevalidation):
957
958 2013-02-06  Tom Sepez  <tsepez@chromium.org>
959
960         document.referrer leakage with XSS Auditor page block
961         https://bugs.webkit.org/show_bug.cgi?id=109089
962
963         Reviewed by Adam Barth.
964
965         Pass "about:blank" as referrer instead of "" so that the actual page
966         is not leaked when empty referrers are replaced later on in the
967         request.
968         
969         * html/parser/XSSAuditorDelegate.cpp:
970         (WebCore::XSSAuditorDelegate::didBlockScript):
971
972 2013-02-06  Kentaro Hara  <haraken@chromium.org>
973
974         [V8] Make an Isolate parameter mandatory in GetTemplate() and GetRawTemplate()
975         https://bugs.webkit.org/show_bug.cgi?id=109026
976
977         Reviewed by Adam Barth.
978
979         Now it's time to kill an optional Isolate parameter.
980
981         No tests. No change in behavior.
982
983         * bindings/scripts/CodeGeneratorV8.pm:
984         (GenerateHeader):
985         (GenerateNamedConstructorCallback):
986         (GenerateImplementation):
987         * bindings/scripts/test/V8/V8Float64Array.cpp:
988         (WebCore::V8Float64Array::GetRawTemplate):
989         (WebCore::V8Float64Array::GetTemplate):
990         * bindings/scripts/test/V8/V8Float64Array.h:
991         (V8Float64Array):
992         (WebCore::V8Float64Array::installPerContextPrototypeProperties):
993         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
994         (WebCore::V8TestActiveDOMObject::GetRawTemplate):
995         (WebCore::V8TestActiveDOMObject::GetTemplate):
996         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
997         (V8TestActiveDOMObject):
998         (WebCore::V8TestActiveDOMObject::installPerContextPrototypeProperties):
999         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1000         (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
1001         (WebCore::V8TestCustomNamedGetter::GetTemplate):
1002         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1003         (V8TestCustomNamedGetter):
1004         (WebCore::V8TestCustomNamedGetter::installPerContextPrototypeProperties):
1005         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1006         (WebCore::V8TestEventConstructor::GetRawTemplate):
1007         (WebCore::V8TestEventConstructor::GetTemplate):
1008         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1009         (V8TestEventConstructor):
1010         (WebCore::V8TestEventConstructor::installPerContextPrototypeProperties):
1011         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1012         (WebCore::V8TestEventTarget::GetRawTemplate):
1013         (WebCore::V8TestEventTarget::GetTemplate):
1014         * bindings/scripts/test/V8/V8TestEventTarget.h:
1015         (V8TestEventTarget):
1016         (WebCore::V8TestEventTarget::installPerContextPrototypeProperties):
1017         * bindings/scripts/test/V8/V8TestException.cpp:
1018         (WebCore::V8TestException::GetRawTemplate):
1019         (WebCore::V8TestException::GetTemplate):
1020         * bindings/scripts/test/V8/V8TestException.h:
1021         (V8TestException):
1022         (WebCore::V8TestException::installPerContextPrototypeProperties):
1023         * bindings/scripts/test/V8/V8TestInterface.cpp:
1024         (WebCore::V8TestInterface::GetRawTemplate):
1025         (WebCore::V8TestInterface::GetTemplate):
1026         * bindings/scripts/test/V8/V8TestInterface.h:
1027         (V8TestInterface):
1028         (WebCore::V8TestInterface::installPerContextPrototypeProperties):
1029         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1030         (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
1031         (WebCore::V8TestMediaQueryListListener::GetTemplate):
1032         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1033         (V8TestMediaQueryListListener):
1034         (WebCore::V8TestMediaQueryListListener::installPerContextPrototypeProperties):
1035         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1036         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
1037         (WebCore::V8TestNamedConstructor::GetRawTemplate):
1038         (WebCore::V8TestNamedConstructor::GetTemplate):
1039         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1040         (V8TestNamedConstructor):
1041         (WebCore::V8TestNamedConstructor::installPerContextPrototypeProperties):
1042         * bindings/scripts/test/V8/V8TestNode.cpp:
1043         (WebCore::V8TestNode::GetRawTemplate):
1044         (WebCore::V8TestNode::GetTemplate):
1045         * bindings/scripts/test/V8/V8TestNode.h:
1046         (V8TestNode):
1047         (WebCore::V8TestNode::installPerContextPrototypeProperties):
1048         * bindings/scripts/test/V8/V8TestObj.cpp:
1049         (WebCore::V8TestObj::GetRawTemplate):
1050         (WebCore::V8TestObj::GetTemplate):
1051         (WebCore::V8TestObj::installPerContextPrototypeProperties):
1052         * bindings/scripts/test/V8/V8TestObj.h:
1053         (V8TestObj):
1054         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1055         (WebCore::V8TestOverloadedConstructors::GetRawTemplate):
1056         (WebCore::V8TestOverloadedConstructors::GetTemplate):
1057         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
1058         (V8TestOverloadedConstructors):
1059         (WebCore::V8TestOverloadedConstructors::installPerContextPrototypeProperties):
1060         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1061         (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
1062         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
1063         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1064         (V8TestSerializedScriptValueInterface):
1065         (WebCore::V8TestSerializedScriptValueInterface::installPerContextPrototypeProperties):
1066         * bindings/v8/V8PerContextData.cpp:
1067         (WebCore::V8PerContextData::constructorForTypeSlowCase):
1068         * bindings/v8/WrapperTypeInfo.h:
1069         (WebCore):
1070         (WebCore::WrapperTypeInfo::installPerContextPrototypeProperties):
1071
1072 2013-02-06  Terry Anderson  <tdanderson@chromium.org>
1073
1074         Add support for gesture scroll events that do not propagate to enclosing scrollables
1075         https://bugs.webkit.org/show_bug.cgi?id=108849
1076
1077         Reviewed by Antonio Gomes.
1078
1079         Tests: fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html
1080                fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html
1081                fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html
1082
1083         Rename RenderLayer::scrollByRecursively() to RenderLayer::scrollBy() and add a parameter
1084         of type RenderLayer::ScrollPropagation to specify whether or not the scroll should
1085         propagate to its parent by recursing. Implement RenderLayer::scrollByRecursively() as a
1086         call to RenderLayer::scrollBy() with argument RenderLayer::ShouldPropagateScroll so
1087         that all existing calls to the function still produce the correct behavior.
1088
1089         In EventHandler::handleGestureScrollUpdate(), call RenderLayer::scrollBy() with
1090         argument RenderLayer::ShouldPropagateScroll if |gestureEvent| is a GestureScrollUpdate
1091         or instead with argument RenderLayer::DontPropagateScroll if |gestureEvent| is a
1092         GestureScrollUpdateWithoutPropagation.
1093
1094         * dom/GestureEvent.cpp:
1095         (WebCore::GestureEvent::create):
1096         * page/EventHandler.cpp:
1097         (WebCore::EventHandler::handleGestureEvent):
1098         (WebCore::EventHandler::handleGestureScrollUpdate):
1099         * platform/PlatformEvent.h:
1100         * platform/Scrollbar.cpp:
1101         (WebCore::Scrollbar::gestureEvent):
1102         * platform/chromium/PopupContainer.cpp:
1103         (WebCore::PopupContainer::handleGestureEvent):
1104         * rendering/RenderLayer.cpp:
1105         (WebCore::RenderLayer::scrollByRecursively):
1106         (WebCore):
1107         (WebCore::RenderLayer::scrollBy):
1108         * rendering/RenderLayer.h:
1109
1110 2013-02-06  Ojan Vafai  <ojan@chromium.org>
1111
1112         [Chromium] table-section-overflow-clip-crash.html hits an assert
1113         https://bugs.webkit.org/show_bug.cgi?id=108594
1114
1115         Reviewed by Levi Weintraub.
1116
1117         When a counter calls setNeedsLayout, it also marks it's containing blocks
1118         as needing layout, so we need to clear the setNeedsLayoutIsForbidden bit on the
1119         containing blocks as well as the counter itself.
1120
1121         Also, use RAII objects for all the places where we clear this bit and make
1122         the setter/getter for it private to RenderObject.
1123
1124         * rendering/RenderCounter.cpp:
1125         (WebCore::RenderCounter::computePreferredLogicalWidths):
1126         * rendering/RenderObject.cpp:
1127         (WebCore::RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope):
1128         (WebCore::RenderObject::markContainingBlocksForLayout):
1129         * rendering/RenderObject.h:
1130         (SetLayoutNeededForbiddenScope):
1131         (RenderObject):
1132         (WebCore::RenderObject::isSetNeedsLayoutForbidden):
1133         (WebCore::RenderObject::setNeedsLayoutIsForbidden):
1134         * rendering/RenderQuote.cpp:
1135         (WebCore::RenderQuote::computePreferredLogicalWidths):
1136         * rendering/RenderTableSection.cpp:
1137         (WebCore::RenderTableSection::calcRowLogicalHeight):
1138         (WebCore::RenderTableSection::layoutRows):
1139         * rendering/mathml/RenderMathMLOperator.cpp:
1140         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
1141         * rendering/mathml/RenderMathMLRoot.cpp:
1142         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
1143         * rendering/mathml/RenderMathMLRow.cpp:
1144         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
1145
1146 2013-02-06  Ojan Vafai  <ojan@chromium.org>
1147
1148         display:none file upload button crashes
1149         https://bugs.webkit.org/show_bug.cgi?id=109102
1150
1151         Reviewed by Levi Weintraub.
1152
1153         Test: fast/forms/file/display-none-upload-button.html
1154
1155         * rendering/RenderFileUploadControl.cpp:
1156         (WebCore::nodeWidth):
1157         (WebCore::RenderFileUploadControl::paintObject):
1158         Having an upload button doesn't mean we have a rendered upload button.
1159         Null check the renderer before trying to access it.
1160
1161 2013-02-06  Dirk Schulze  <dschulze@adobe.com>
1162
1163         Context's currentPath should check for passed type
1164         https://bugs.webkit.org/show_bug.cgi?id=109097
1165
1166         Reviewed by Dean Jackson.
1167
1168         Add check for passed pointer and return earlier.
1169
1170         Test: fast/canvas/canvas-currentPath-crash.html
1171
1172         * html/canvas/CanvasRenderingContext2D.cpp:
1173         (WebCore::CanvasRenderingContext2D::setCurrentPath):
1174
1175 2013-02-06  Rafael Weinstein  <rafaelw@chromium.org>
1176
1177         [HTMLTemplateElement] Non </template> end tags should be ignored in "template contents" insertion mode.
1178         https://bugs.webkit.org/show_bug.cgi?id=109090
1179
1180         Reviewed by Adam Barth.
1181
1182         https://dvcs.w3.org/hg/webcomponents/raw-file/38536d37fb82/spec/templates/index.html#template-contents-insertion-mode.
1183
1184         Test added to html5lib suite.
1185
1186         * html/parser/HTMLTreeBuilder.cpp:
1187         (WebCore::HTMLTreeBuilder::processEndTag):
1188
1189 2013-02-06  Alexandre Elias  <aelias@chromium.org>
1190
1191         Make ScrollView::paint() clip by visibleContentRect
1192         https://bugs.webkit.org/show_bug.cgi?id=108888
1193
1194         Reviewed by Levi Weintraub.
1195
1196         When applyPageScaleFactorInCompositor or fixedVisibleContentRect
1197         are used, frameRect() and visibleContentRect(true).size() are
1198         no longer synonyms, and the latter is the one that should be
1199         used for clipping paints.
1200
1201         New WebFrameTest: pageScaleFactorScalesPaintClip.
1202
1203         * platform/ScrollView.cpp:
1204         (WebCore::ScrollView::paint):
1205
1206 2013-02-06  Dima Gorbik  <dgorbik@apple.com>
1207
1208         Store the language internally instead of using lang attribute for WebVTT nodes
1209         https://bugs.webkit.org/show_bug.cgi?id=108858
1210
1211         Reviewed by Eric Carlson.
1212
1213         Only language webvtt elements should have a lang attribute so we have to store
1214         the language internally in the element. Refactored the code to make 
1215         computeInheritedLanguage virtual.
1216
1217         Existing tests were modified to cover this case.
1218
1219         * css/SelectorChecker.cpp:
1220         (WebCore::SelectorChecker::checkOne):
1221         * html/track/WebVTTElement.cpp:
1222         (WebCore::WebVTTElement::WebVTTElement):
1223         (WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
1224         (WebCore::WebVTTElement::createEquivalentHTMLElement): clone the internal language property.
1225         * html/track/WebVTTElement.h:
1226         (WebCore::WebVTTElement::language):
1227         (WebCore::WebVTTElement::setLanguage):
1228         * html/track/WebVTTParser.cpp: only set the lang attribute for language objects.
1229         (WebCore::WebVTTParser::constructTreeFromToken):
1230
1231 2013-02-06  Levi Weintraub  <leviw@chromium.org>
1232
1233         Negative text indents can break RenderBlock's inline maximum preferred width calculation
1234         https://bugs.webkit.org/show_bug.cgi?id=108973
1235
1236         Reviewed by Emil A Eklund.
1237
1238         Change two quirks about to how we calculate a block's inline preferred width with
1239         text-indent.
1240
1241         First, re-use text-indent that's first applied to floats on text that follows it.
1242         This matches Layout, as otherwise we can prematurely wrap text when there's a negative
1243         margin on a block starting with a float. This also matches FireFox.
1244
1245         Second, correct how the max preferred width is calculated in the presence of a negative
1246         text-indent. If the text-indent is more negative than the first text line break, we
1247         update the value to be the remainder. Previously, we added this remaining negative value
1248         to subsequent minimum and maximum preferred width calculations (until the remainder was
1249         gone). This is wrong for the max preferred width, as we're adding the negative value more
1250         than once, and leads to a max preferred width that's smaller than our line.
1251
1252         Test: fast/css/negative-text-indent-in-inline-block.html
1253
1254         * rendering/RenderBlock.cpp:
1255         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1256
1257 2013-02-06  Mark Lam  <mark.lam@apple.com>
1258
1259         Fix broken release builds, greening the bots.
1260         https://bugs.webkit.org/show_bug.cgi?id=107475.
1261
1262         Not reviewed.
1263
1264         No new tests.
1265
1266         * Modules/webdatabase/DatabaseManager.cpp:
1267         (WebCore::logOpenDatabaseError):
1268
1269 2013-02-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1270
1271         Unreviewed, rolling out r142025.
1272         http://trac.webkit.org/changeset/142025
1273         https://bugs.webkit.org/show_bug.cgi?id=109091
1274
1275         broke the build (Requested by tdanderson on #webkit).
1276
1277         * dom/GestureEvent.cpp:
1278         (WebCore::GestureEvent::create):
1279         * page/EventHandler.cpp:
1280         (WebCore::EventHandler::handleGestureEvent):
1281         (WebCore::EventHandler::handleGestureScrollUpdate):
1282         * platform/PlatformEvent.h:
1283         * platform/Scrollbar.cpp:
1284         (WebCore::Scrollbar::gestureEvent):
1285         * platform/chromium/PopupContainer.cpp:
1286         (WebCore::PopupContainer::handleGestureEvent):
1287         * rendering/RenderLayer.cpp:
1288         (WebCore::RenderLayer::scrollByRecursively):
1289         * rendering/RenderLayer.h:
1290
1291 2013-02-06  Mark Lam  <mark.lam@apple.com>
1292
1293         Split openDatabase() between front and back end work.
1294         https://bugs.webkit.org/show_bug.cgi?id=107475.
1295
1296         Reviewed by Anders Carlsson.
1297
1298         The main work of splitting DatabaseManager::openDatabase() is in
1299         refactoring how DatabaseTracker::canEstablishDatabase() works. It used
1300         to check for adequate space quota, and if the check fails, it would call
1301         back into the client from inside canEstablishDatabase(). The call back
1302         allows the client to update the quota (if appropriate). Thereafter,
1303         canEstablishDatabase() will retry its quota check.
1304
1305         In a webkit2 world, we'll want to minimize the traffic between the
1306         client (script side) and the server (sqlite db side), and ideally, we
1307         don't want the server to call back to the client. Note: the
1308         DatabaseTracker belongs on the server side.
1309
1310         To achieve this, we split canEstablishDatabase() into 2 parts: the
1311         checks before the call back to the client, and the checks after.
1312         The first part will retain the name canEstablishDatabase(), and the
1313         second part will be named retryCanEstablishDatabase().
1314         We also added a DatabaseServer::openDatabase() function that can be
1315         called with a retry flag.
1316
1317         The client side DatabaseManager::openDatabase() will call
1318         DatabaseServer::openDatabase(), which then calls canEstablishDatabase()
1319         to do its quota check. If there is enough quota,
1320         DatabaseServer::openDatabase() will proceed to open the backend database
1321         without return to the client first. The opened database will be returned
1322         to the client.
1323
1324         If DatabaseServer::openDatabase() finds inadequate quota the first time,
1325         it will return with a DatabaseSizeExceededQuota error. The DatabaseManager
1326         (on the client side) will check for this error and call back to its client
1327         for an opportunity to increase the quota. Thereafter, the DatabaseManager
1328         will call DatabaseServer::openDatabase() again. This time,
1329         DatabaseServer::openDatabase() will call retryCanEstablishDatabase() to
1330         check the quota, and then open the backend database if there is enough
1331         quota.
1332
1333         No new tests.
1334
1335         * Modules/webdatabase/AbstractDatabaseServer.h:
1336         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
1337         (WebCore::DOMWindowWebDatabase::openDatabase):
1338         * Modules/webdatabase/Database.cpp:
1339         (WebCore::Database::create):
1340         * Modules/webdatabase/Database.h:
1341         (Database):
1342         * Modules/webdatabase/DatabaseBackend.cpp:
1343         (WebCore::DatabaseBackend::performOpenAndVerify):
1344         * Modules/webdatabase/DatabaseBackend.h:
1345         (DatabaseBackend):
1346         * Modules/webdatabase/DatabaseBackendAsync.cpp:
1347         (WebCore::DatabaseBackendAsync::openAndVerifyVersion):
1348         (WebCore::DatabaseBackendAsync::performOpenAndVerify):
1349         * Modules/webdatabase/DatabaseBackendAsync.h:
1350         (DatabaseBackendAsync):
1351         * Modules/webdatabase/DatabaseBackendSync.cpp:
1352         (WebCore::DatabaseBackendSync::openAndVerifyVersion):
1353         * Modules/webdatabase/DatabaseBackendSync.h:
1354         (DatabaseBackendSync):
1355         * Modules/webdatabase/DatabaseError.h:
1356         (WebCore::ENUM_CLASS):
1357         * Modules/webdatabase/DatabaseManager.cpp:
1358         (WebCore::DatabaseManager::exceptionCodeForDatabaseError):
1359         (WebCore::DatabaseManager::openDatabaseBackend):
1360         (WebCore::DatabaseManager::openDatabase):
1361         (WebCore::DatabaseManager::openDatabaseSync):
1362         * Modules/webdatabase/DatabaseManager.h:
1363         (DatabaseManager):
1364         * Modules/webdatabase/DatabaseServer.cpp:
1365         (WebCore::DatabaseServer::openDatabase):
1366         (WebCore::DatabaseServer::createDatabase):
1367         * Modules/webdatabase/DatabaseServer.h:
1368         * Modules/webdatabase/DatabaseSync.cpp:
1369         (WebCore::DatabaseSync::create):
1370         * Modules/webdatabase/DatabaseSync.h:
1371         (DatabaseSync):
1372         * Modules/webdatabase/DatabaseTracker.cpp:
1373         (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
1374         (WebCore::DatabaseTracker::canEstablishDatabase):
1375         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
1376         * Modules/webdatabase/DatabaseTracker.h:
1377         (DatabaseTracker):
1378         * Modules/webdatabase/WorkerContextWebDatabase.cpp:
1379         (WebCore::WorkerContextWebDatabase::openDatabase):
1380         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
1381         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
1382         (WebCore::DatabaseTracker::canEstablishDatabase):
1383         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
1384
1385 2013-02-06  Tony Gentilcore  <tonyg@chromium.org>
1386
1387         Fix CompactHTMLToken's copy ctor to copy all fields
1388         https://bugs.webkit.org/show_bug.cgi?id=109076
1389
1390         Reviewed by Adam Barth.
1391
1392         This was introduced by me in r142004. Without this patch we fail all tests when using the background parser.
1393
1394         Also don't use getters in copy ctor.
1395
1396         No new tests because no new functionality.
1397
1398         * html/parser/CompactHTMLToken.cpp:
1399         (WebCore::CompactHTMLToken::CompactHTMLToken):
1400
1401 2013-02-06  Brian Salomon  <bsalomon@google.com>
1402
1403         [Chromium/Skia] Remove use of deprecated Skia names
1404         https://bugs.webkit.org/show_bug.cgi?id=109085
1405
1406         Reviewed by Stephen White.
1407
1408         Tested by every existing canvas2d test.
1409
1410         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
1411         (WebCore::GraphicsContext3DPrivate::grContext):
1412
1413 2013-02-06  Terry Anderson  <tdanderson@chromium.org>
1414
1415         Add support for gesture scroll events that do not propagate to enclosing scrollables
1416         https://bugs.webkit.org/show_bug.cgi?id=108849
1417
1418         Reviewed by Antonio Gomes.
1419
1420         Tests: fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html
1421                fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html
1422                fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html
1423
1424         Rename RenderLayer::scrollByRecursively() to RenderLayer::scrollBy() and add a parameter
1425         of type RenderLayer::ScrollPropagation to specify whether or not the scroll should
1426         propagate to its parent by recursing. Implement RenderLayer::scrollByRecursively() as a
1427         call to RenderLayer::scrollBy() with argument RenderLayer::ShouldPropagateScroll so
1428         that all existing calls to the function still produce the correct behavior.
1429
1430         In EventHandler::handleGestureScrollUpdate(), call RenderLayer::scrollBy() with
1431         argument RenderLayer::ShouldPropagateScroll if |gestureEvent| is a GestureScrollUpdate
1432         or instead with argument RenderLayer::DontPropagateScroll if |gestureEvent| is a
1433         GestureScrollUpdateWithoutPropagation.
1434
1435         * dom/GestureEvent.cpp:
1436         (WebCore::GestureEvent::create):
1437         * page/EventHandler.cpp:
1438         (WebCore::EventHandler::handleGestureEvent):
1439         (WebCore::EventHandler::handleGestureScrollUpdate):
1440         * platform/PlatformEvent.h:
1441         * platform/Scrollbar.cpp:
1442         (WebCore::Scrollbar::gestureEvent):
1443         * platform/chromium/PopupContainer.cpp:
1444         (WebCore::PopupContainer::handleGestureEvent):
1445         * rendering/RenderLayer.cpp:
1446         (WebCore::RenderLayer::scrollByRecursively):
1447         (WebCore):
1448         (WebCore::RenderLayer::scrollBy):
1449         * rendering/RenderLayer.h:
1450
1451 2013-02-06  Ryosuke Niwa  <rniwa@webkit.org>
1452
1453         REGRESSION(r141136): Apple's internal PLT test suite doesn't finish
1454         https://bugs.webkit.org/show_bug.cgi?id=108380
1455
1456         Reviewed by Alexey Proskuryakov.
1457
1458         Re-enable the main resource cache since the regression had been fixed in r141615.
1459
1460         * loader/cache/CachedResourceLoader.cpp:
1461         (WebCore::CachedResourceLoader::requestResource):
1462
1463 2013-02-06  Uday Kiran  <udaykiran@motorola.com>
1464
1465         Implement 'vmax' from CSS3 values and units
1466         https://bugs.webkit.org/show_bug.cgi?id=91440
1467
1468         Reviewed by Antti Koivisto.
1469
1470         vmax is implemented as primitive length unit.
1471         New length type ViewportPercentageMax is added and included support for fetching the value
1472         of this viewport percentage unit based on current viewport size.
1473
1474         The specification related to this implementation is
1475         http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths.
1476
1477         Tests: css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmax-absolute.html
1478                css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmax.html
1479
1480         * css/CSSGrammar.y.in: Added vmax support.
1481         * css/CSSParser.cpp: Parsing of vmax unit.
1482         (WebCore::CSSParser::validUnit): Added vmax to valid units.
1483         (WebCore::CSSParser::createPrimitiveNumericValue): Added vmax to primitive untis.
1484         (WebCore::CSSParser::parseValidPrimitive): Creation of CSSPrimitive for vmax.
1485         (WebCore::CSSParser::detectNumberToken): Parsing of vmax token.
1486         * css/CSSParserValues.cpp:
1487         (WebCore::CSSParserValue::createCSSValue): Added support for vmax.
1488         * css/CSSPrimitiveValue.cpp:
1489         (WebCore::isValidCSSUnitTypeForDoubleConversion): Added support for vmax.
1490         (WebCore::unitCategory): Ditto.
1491         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
1492         (WebCore::CSSPrimitiveValue::cleanup):
1493         (WebCore::CSSPrimitiveValue::customCssText): Added support for vmax.
1494         (WebCore::CSSPrimitiveValue::viewportPercentageLength): Function to create the Length structure for the viewport-percentage unit types.
1495         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1496         * css/CSSPrimitiveValue.h:
1497         (WebCore::CSSPrimitiveValue::isViewportPercentageLength): Checks whether the primitive value is ViewportPercentage Length.
1498         * css/CSSPrimitiveValue.idl: Added support for vmax.
1499         * css/LengthFunctions.cpp: Calcuation of length value based on the current viewport size.
1500         (WebCore::minimumValueForLength):
1501         (WebCore::valueForLength):
1502         (WebCore::floatValueForLength):
1503         * platform/Length.h:
1504         (WebCore::Length::isViewportPercentage): To check the Length is of type ViewportPercentage.
1505         * rendering/RenderBox.cpp:
1506         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1507         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1508
1509 2013-02-06  Pravin D  <pravind.2k4@gmail.com>
1510
1511         When a block element is made inline positioned and has static left and right,  it does not follow inline formatting context
1512         https://bugs.webkit.org/show_bug.cgi?id=91665
1513
1514         Reviewed by Julien Chaffraix.
1515
1516         Out-of-flow-positioned elements have their display overriden to BLOCK. When a static block elements 
1517         changes to inline out-of-flow-positioned or vice-versa, the element current and previous display properties 
1518         are same. This causes the element to follow a wrong flow context(in this case Block context) and the element
1519         is laid out incorrectly. The patch fixes the issue by reattaching the renderers of the node whenever either
1520         position property changes or when its floating property changes.
1521         Also the cases when an out-of-flow-positioned/floating element changes to static/non-floating element where
1522         being specially handled. As reattaching the renderers in the above cases correctly handles the above cases,
1523         special handling for such cases is no more required and the related code can be safely removed.
1524  
1525         Reattaching renderers for the afore mentioned issues takes a different(longer) code path. Performance measurements
1526         summary for the same is as follows:
1527                                                               % increase in time
1528          Absolute-block-to-static-block                            2.00
1529          Absolute-inline-to-static-block                           1.21
1530          Absolute-inline-to-static-inline                          1.18
1531          Static-block-to-absolute-block                            1.13
1532          Static-inline-to-absolute-inline                          1.35
1533          Floating-block-non-floating-block                         0.85
1534          Floating-inline-non-floating-block                        0.66
1535          Floating-inline-non-floating-inline                       0.57
1536          Non-floating-block-floating-block                         0.12
1537          Non-floating-inline-floating-inline                       1.36
1538
1539         Tests: fast/dynamic/absolute-positioned-to-static-positioned.html
1540                fast/dynamic/floating-to-non-floating.html
1541                fast/dynamic/non-floating-to-floating.html
1542                fast/dynamic/static-positioned-to-absolute-positioned.html
1543
1544         * dom/Node.cpp:
1545         (WebCore::Node::diff):
1546           Return detach in the following conditions:
1547              1) Element changes to out-of-flow-positioned or vice-versa.
1548              2) Element becomes floating or vice-versa.
1549
1550         * rendering/RenderBlock.cpp:
1551         (WebCore):
1552         * rendering/RenderBlock.h:
1553         (RenderBlock):
1554         * rendering/RenderBoxModelObject.h:
1555         (RenderBoxModelObject):
1556         * rendering/RenderInline.cpp:
1557         (WebCore):
1558         * rendering/RenderInline.h:
1559         (RenderInline):
1560         * rendering/RenderObject.cpp:
1561         (WebCore):
1562         (WebCore::RenderObject::styleWillChange):
1563         (WebCore::RenderObject::styleDidChange):
1564         * rendering/RenderObject.h:
1565         (RenderObject):
1566           The fix in Node::diff() obsoletes some code. The above deletion are part of this dead code cleanup.
1567
1568 2013-02-06  Chris Fleizach  <cfleizach@apple.com>
1569
1570         AX: if <html> has an ARIA attribute, it's exposed as an AXGroup
1571         https://bugs.webkit.org/show_bug.cgi?id=109008
1572
1573         Reviewed by Ryosuke Niwa.
1574
1575         If an <html> element had an ARIA attribute, it was being turned into an element
1576         in the AX hierarchy. This was causing trouble for screen readers by inserting
1577         an unexpected element in the navigation sequence.
1578
1579         Test: accessibility/html-html-element-is-ignored.html
1580
1581         * accessibility/AccessibilityRenderObject.cpp:
1582         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1583
1584 2013-02-06  Shawn Singh  <shawnsingh@chromium.org>
1585
1586         RenderLayer hasVisibleContent() has inconsistent semantics causing disappearing composited layers
1587         https://bugs.webkit.org/show_bug.cgi?id=108118
1588
1589         Reviewed by Simon Fraser.
1590
1591         RenderLayerBacking::hasVisibleNonCompositingDescendantLayers was
1592         only checking whether direct children had visible content. As a
1593         result, composited layers had wrong visibility status if only a
1594         deeper descendant RenderLayer was visible.
1595
1596         Test: compositing/visibility/visibility-on-distant-descendant.html
1597
1598         * rendering/RenderLayerBacking.cpp:
1599         (WebCore::hasVisibleNonCompositingDescendant): copied the original
1600         implementation into this function; then added the RenderLayer
1601         recursion as appropriate.
1602         (WebCore):
1603         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
1604         This is now just a wrapper to the private static recursive
1605         function.
1606
1607 2013-02-06  Jonathon Jongsma  <jonathon.jongsma@collabora.com>
1608
1609         [GStreamer] MediaPlayer's code is not easily reusable by other GStreamer-based players
1610         https://bugs.webkit.org/show_bug.cgi?id=100261
1611
1612         Refactor the media player implementation so that more of the
1613         internal functionality can be shared between the current media
1614         backend and the mediastream player backend.  Common code is
1615         broken out into a MediaPlayerPrivateGStreamerBase class, and
1616         both MediaPlayerPrivateGStreamer and
1617         StreamMediaPlayerPrivateGStreamer inherit from this base class.
1618
1619         Reviewed by Philippe Normand
1620
1621         No new tests since functionality is covered by existing media tests
1622
1623         * GNUmakefile.list.am:
1624         * PlatformEfl.cmake:
1625         * Target.pri:
1626         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
1627         (WebCore::FullscreenVideoControllerGStreamer::create):
1628         (WebCore::FullscreenVideoControllerGStreamer::FullscreenVideoControllerGStreamer):
1629         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h:
1630         (WebCore):
1631         (FullscreenVideoControllerGStreamer):
1632         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1633         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1634         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1635         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1636         (MediaPlayerPrivateGStreamer):
1637         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
1638         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Added.
1639         (WebCore):
1640         (WebCore::greatestCommonDivisor):
1641         (WebCore::mediaPlayerPrivateVolumeChangedCallback):
1642         (WebCore::mediaPlayerPrivateVolumeChangeTimeoutCallback):
1643         (WebCore::mediaPlayerPrivateMuteChangedCallback):
1644         (WebCore::mediaPlayerPrivateMuteChangeTimeoutCallback):
1645         (WebCore::mediaPlayerPrivateRepaintCallback):
1646         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
1647         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1648         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
1649         (WebCore::MediaPlayerPrivateGStreamerBase::setVolume):
1650         (WebCore::MediaPlayerPrivateGStreamerBase::volume):
1651         (WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfVolumeChange):
1652         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
1653         (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
1654         (WebCore::MediaPlayerPrivateGStreamerBase::readyState):
1655         (WebCore::MediaPlayerPrivateGStreamerBase::sizeChanged):
1656         (WebCore::MediaPlayerPrivateGStreamerBase::setMuted):
1657         (WebCore::MediaPlayerPrivateGStreamerBase::muted):
1658         (WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfMute):
1659         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
1660         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
1661         (WebCore::MediaPlayerPrivateGStreamerBase::setSize):
1662         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1663         (WebCore::MediaPlayerPrivateGStreamerBase::enterFullscreen):
1664         (WebCore::MediaPlayerPrivateGStreamerBase::exitFullscreen):
1665         (WebCore::MediaPlayerPrivateGStreamerBase::supportsFullscreen):
1666         (WebCore::MediaPlayerPrivateGStreamerBase::platformMedia):
1667         (WebCore::MediaPlayerPrivateGStreamerBase::movieLoadType):
1668         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
1669         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
1670         (WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount):
1671         (WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount):
1672         (WebCore::MediaPlayerPrivateGStreamerBase::audioDecodedByteCount):
1673         (WebCore::MediaPlayerPrivateGStreamerBase::videoDecodedByteCount):
1674         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Added.
1675         (WebCore):
1676         (MediaPlayerPrivateGStreamerBase):
1677         (WebCore::MediaPlayerPrivateGStreamerBase::supportsMuting):
1678         (WebCore::MediaPlayerPrivateGStreamerBase::setVisible):
1679         (WebCore::MediaPlayerPrivateGStreamerBase::hasSingleSecurityOrigin):
1680         (WebCore::MediaPlayerPrivateGStreamerBase::maxTimeLoaded):
1681         (WebCore::MediaPlayerPrivateGStreamerBase::canEnterFullscreen):
1682         (WebCore::MediaPlayerPrivateGStreamerBase::mediaPlayer):
1683         (WebCore::MediaPlayerPrivateGStreamerBase::audioSink):
1684         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
1685         (WebCore::FullscreenVideoControllerGtk::FullscreenVideoControllerGtk):
1686         * platform/graphics/gtk/FullscreenVideoControllerGtk.h:
1687         (FullscreenVideoControllerGtk):
1688
1689 2013-02-06  Tony Gentilcore  <tonyg@chromium.org>
1690
1691         Call XSSAuditor's didBlockScript() for the threaded HTML parser
1692         https://bugs.webkit.org/show_bug.cgi?id=108726
1693
1694         Reviewed by Adam Barth.
1695
1696         This patch causes us to call didBlockScript() on the main thread if the CompactHTML token has XSSInfo.
1697         To do so, we:
1698         1. Rename DidBlockScriptRequest to XSSInfo.
1699         2. Add an OwnPtr<XSSInfo> field to CompactHTMLToken.
1700         3. Add an isSafeToSendToAnotherThread() method to String and KURL.
1701
1702         We don't yet populate didBlockScriptRequest on the background thread, but this should just work once we do.
1703
1704         No new tests because no new functionality.
1705
1706         * html/parser/BackgroundHTMLParser.cpp:
1707         (WebCore::BackgroundHTMLParser::pumpTokenizer): Update comment for rename.
1708         * html/parser/CompactHTMLToken.cpp:
1709         (SameSizeAsCompactHTMLToken):
1710         (WebCore::CompactHTMLToken::CompactHTMLToken): Add a copy constructor used by Vector.
1711         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread): Include new m_xssInfo field in safety check.
1712         (WebCore):
1713         (WebCore::CompactHTMLToken::xssInfo): Added.
1714         (WebCore::CompactHTMLToken::setXSSInfo): Added.
1715         * html/parser/CompactHTMLToken.h: Add an OwnPtr<XSSInfo> field to CompactHTMLToken.
1716         (WebCore):
1717         (CompactHTMLToken):
1718         (WTF): Add VectorTraits necessary for copying Vector fields objects that contain an OwnPtr.
1719         * html/parser/HTMLDocumentParser.cpp:
1720         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser): Add new didBlockScript() call.
1721         (WebCore::HTMLDocumentParser::pumpTokenizer):
1722         * html/parser/XSSAuditor.cpp: Renaming.
1723         (WebCore::XSSAuditor::filterToken):
1724         * html/parser/XSSAuditor.h: Renaming.
1725         (WebCore):
1726         (XSSAuditor):
1727         * html/parser/XSSAuditorDelegate.cpp:
1728         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
1729         (WebCore):
1730         (WebCore::XSSAuditorDelegate::didBlockScript):
1731         * html/parser/XSSAuditorDelegate.h:
1732         (WebCore::XSSInfo::create):
1733         (XSSInfo):
1734         (WebCore::XSSInfo::XSSInfo):
1735         (XSSAuditorDelegate):
1736         * platform/KURL.cpp:
1737         (WebCore::KURL::isSafeToSendToAnotherThread): Added.
1738         (WebCore):
1739         * platform/KURL.h:
1740         (KURL):
1741         * platform/KURLGoogle.cpp:
1742         (WebCore):
1743         (WebCore::KURLGooglePrivate::isSafeToSendToAnotherThread): Added.
1744         * platform/KURLGooglePrivate.h:
1745         (KURLGooglePrivate):
1746         * platform/KURLWTFURLImpl.h:
1747         (WebCore::KURLWTFURLImpl::isSafeToSendToAnotherThread): Added.
1748
1749 2013-02-06  Dean Jackson  <dino@apple.com>
1750
1751         Minor updates to captions menu UI
1752         https://bugs.webkit.org/show_bug.cgi?id=109005
1753
1754         Reviewed by Eric Carlson.
1755
1756         Now that we only have a single section in the captions menu, remove the
1757         unnecessary wrapper element. Also update the UI for Mac so that the menu
1758         grows in size dynamically, and change the text we display for a caption
1759         that has neither label or language identifiers.
1760
1761         Covered by existing tests.
1762
1763         * English.lproj/Localizable.strings: New string for an unknown caption label.
1764         * css/fullscreenQuickTime.css: New rules for the captions menu.
1765         (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
1766         (video:-webkit-full-screen::-webkit-media-controls-closed-captions-track-list):
1767         * css/mediaControlsQuickTime.css: Ditto.
1768         (video::-webkit-media-controls-closed-captions-container):
1769         (video::-webkit-media-controls-closed-captions-track-list):
1770         * html/shadow/MediaControlElements.cpp:
1771         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
1772             Remove the <section> element container.
1773         * platform/LocalizedStrings.cpp:
1774         (WebCore::textTrackNoLabelText): New string for an unknown caption label.
1775
1776 2013-02-06  Vsevolod Vlasov  <vsevik@chromium.org>
1777
1778         Web Inspector: Remove isSnippet field from FileDescriptor and UISourceCode.
1779         https://bugs.webkit.org/show_bug.cgi?id=109045
1780         
1781         Reviewed by Pavel Feldman.
1782
1783         Snippets are now distinguished based on uiSourceCode project.
1784
1785         * inspector/front-end/JavaScriptSourceFrame.js:
1786         (WebInspector.JavaScriptSourceFrame.prototype._supportsEnabledBreakpointsWhileEditing):
1787         * inspector/front-end/NavigatorView.js:
1788         * inspector/front-end/ScriptSnippetModel.js:
1789         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
1790         * inspector/front-end/ScriptsNavigator.js:
1791         (WebInspector.ScriptsNavigator.prototype._navigatorViewForUISourceCode):
1792         (WebInspector.ScriptsNavigator.prototype.addUISourceCode):
1793         (WebInspector.ScriptsNavigator.prototype.removeUISourceCode):
1794         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
1795         (WebInspector.ScriptsNavigator.prototype.rename):
1796         (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
1797         (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet):
1798         * inspector/front-end/ScriptsPanel.js:
1799         (WebInspector.ScriptsPanel.prototype._showFile):
1800         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
1801         (WebInspector.ScriptsPanel.prototype.set _fileRenamed):
1802         * inspector/front-end/SimpleWorkspaceProvider.js:
1803         (WebInspector.SimpleWorkspaceProvider.prototype.addFile):
1804         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
1805         * inspector/front-end/Workspace.js:
1806         (WebInspector.FileDescriptor):
1807         (WebInspector.Project.prototype._fileAdded):
1808
1809 2013-02-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1810
1811         Unreviewed, rolling out r141983.
1812         http://trac.webkit.org/changeset/141983
1813         https://bugs.webkit.org/show_bug.cgi?id=109055
1814
1815         lots of new crashes in handlescope (Requested by gavinp on
1816         #webkit).
1817
1818         * bindings/v8/DOMDataStore.h:
1819         (WebCore::DOMDataStore::setWrapperInObject):
1820         * bindings/v8/DOMWrapperWorld.h:
1821         (DOMWrapperWorld):
1822         (WebCore::DOMWrapperWorld::isolated):
1823         * bindings/v8/V8Binding.h:
1824         (WebCore):
1825         (WebCore::worldForEnteredContextIfIsolated):
1826         * bindings/v8/V8DOMWindowShell.cpp:
1827         (WebCore::V8DOMWindowShell::initializeIfNeeded):
1828         * bindings/v8/V8GCController.cpp:
1829         (WebCore::WrapperVisitor::WrapperVisitor):
1830         (WebCore):
1831         (WebCore::gcTree):
1832         (WebCore::V8GCController::didCreateWrapperForNode):
1833         (WebCore::V8GCController::gcPrologue):
1834         (WebCore::V8GCController::minorGCPrologue):
1835         (WebCore::V8GCController::majorGCPrologue):
1836         * bindings/v8/V8GCController.h:
1837         (V8GCController):
1838
1839 2013-02-06  Andreas Kling  <akling@apple.com>
1840
1841         Optimize GlyphPage for case where all glyphs are available in the same font.
1842         <http://webkit.org/b/108835>
1843         <rdar://problem/13157042>
1844
1845         Reviewed by Antti Koivisto.
1846
1847         Let GlyphPage begin optimistically assuming that all its glyphs will be represented in
1848         the same SimpleFontData*. In this (very common) case, only keep a single SimpleFontData*.
1849
1850         If glyphs from multiple fonts are mixed in one page, an array of per-glyph SimpleFontData*
1851         is allocated transparently.
1852
1853         4.98 MB progression on Membuster3.
1854
1855         * platform/graphics/GlyphPageTreeNode.cpp:
1856         (WebCore::GlyphPageTreeNode::initializePage):
1857         * platform/graphics/GlyphPage.h:
1858         (WebCore::GlyphPage::createUninitialized):
1859         (WebCore::GlyphPage::createZeroedSystemFallbackPage):
1860         (WebCore::GlyphPage::createCopiedSystemFallbackPage):
1861
1862             There are now three ways of constructing a GlyphPage, two of them are only used for
1863             creating system fallback pages.
1864
1865         (WebCore::GlyphPage::setGlyphDataForIndex):
1866
1867             Hold off creating a SimpleFontData* array until we're sure there are two different
1868             SimpleFontData* backing the glyphs in this page.
1869             We don't store font data for glyph #0, instead we let the getters always return null for it.
1870
1871         (WebCore::GlyphPage::~GlyphPage):
1872
1873             Free the SimpleFontData* array if needed.
1874
1875         (WebCore::GlyphPage::glyphDataForCharacter):
1876         (WebCore::GlyphPage::glyphDataForIndex):
1877         (WebCore::GlyphPage::fontDataForCharacter):
1878
1879             The font data for glyph #0 is always a null pointer now.
1880
1881         (WebCore::GlyphPage::clearForFontData):
1882
1883             Updated for new storage format.
1884
1885         * rendering/svg/SVGTextRunRenderingContext.cpp:
1886         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1887
1888             Fix bug where non-zero glyph was temporarily associated with null font data,
1889             which triggered the new assertion in setGlyphDataForIndex().
1890
1891 2013-02-06  Pavel Feldman  <pfeldman@chromium.org>
1892
1893         Follow up to r141979: do not consume Home/End.
1894         Not reviewed.
1895
1896         * inspector/front-end/FilteredItemSelectionDialog.js:
1897         (WebInspector.FilteredItemSelectionDialog.prototype._onKeyDown):
1898
1899 2013-02-06  Vsevolod Vlasov  <vsevik@chromium.org>
1900
1901         Web Inspector: Remove show script folders setting
1902         https://bugs.webkit.org/show_bug.cgi?id=108940
1903
1904         Reviewed by Pavel Feldman.
1905
1906         Removed showScriptFolders setting, the sources are never shown as a flat list in navigator anymore.
1907
1908         * inspector/front-end/NavigatorView.js:
1909         (WebInspector.NavigatorView):
1910         (WebInspector.NavigatorView.prototype._getOrCreateFolderTreeElement):
1911         * inspector/front-end/Settings.js:
1912         * inspector/front-end/SettingsScreen.js:
1913         (WebInspector.GenericSettingsTab):
1914
1915 2013-02-06  Andrey Lushnikov  <lushnikov@chromium.org>
1916
1917         Web Inspector: update javascriptsourcetokenizer to produce "whitespaces" token
1918         https://bugs.webkit.org/show_bug.cgi?id=108945
1919
1920         Reviewed by Pavel Feldman.
1921
1922         Update re2c grammar for SourceJavaScriptTokenizer to produce
1923         "whitespace" token which holds consequtive whitespaces in it.
1924
1925         Updated existing tests expectations.
1926
1927         * inspector/front-end/DOMSyntaxHighlighter.js:
1928         (WebInspector.DOMSyntaxHighlighter.prototype.createSpan): Do not strip spaces from tokens with class "whitespaces".
1929         * inspector/front-end/SourceJavaScriptTokenizer.js: Regenerated.
1930         (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken):
1931         * inspector/front-end/SourceJavaScriptTokenizer.re2js:
1932
1933 2013-02-06  Andrey Lushnikov  <lushnikov@chromium.org>
1934
1935         Web Inspector: refactor registerShortcuts method of DTE
1936         https://bugs.webkit.org/show_bug.cgi?id=109031
1937
1938         Reviewed by Pavel Feldman.
1939
1940         Implement _registerShortcuts method in TextEditorMainPanel which will
1941         bind its private methods to the different key combinations. Refactor
1942         method handlers handleUndoRedo, handleTabKeyPress and handleEnterKey
1943         from public to private.
1944
1945         No new tests: no change in behaviour.
1946
1947         * inspector/front-end/DefaultTextEditor.js:
1948         (WebInspector.DefaultTextEditor.prototype._registerShortcuts): Remove bindings of TextEditorMainPanel methods
1949         (WebInspector.DefaultTextEditor.prototype._handleKeyDown):
1950         (WebInspector.TextEditorMainPanel):
1951         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts): Added.
1952         (WebInspector.TextEditorMainPanel.prototype._handleUndoRedo):
1953         (WebInspector.TextEditorMainPanel.prototype.handleKeyDown):
1954
1955 2013-02-06  Mike West  <mkwst@chromium.org>
1956
1957         Add an ENABLE_NOSNIFF feature flag.
1958         https://bugs.webkit.org/show_bug.cgi?id=109029
1959
1960         Reviewed by Jochen Eisinger.
1961
1962         This new flag will control the behavior of 'X-Content-Type-Options: nosniff'
1963         when processing script and other resource types.
1964
1965         * Configurations/FeatureDefines.xcconfig:
1966
1967 2013-02-06  Tommy Widenflycht  <tommyw@google.com>
1968
1969         MediaStream API: Implement DTMF support in RTCPeerConnection
1970         https://bugs.webkit.org/show_bug.cgi?id=106782
1971
1972         Reviewed by Adam Barth.
1973
1974         The WebRTC specification have added support for DTMF:
1975         http://dev.w3.org/2011/webrtc/editor/webrtc.html#peer-to-peer-dtmf
1976
1977         Implementation wise this is implemented using the same pattern as RTCDataChannel;
1978         where a RTCDTMFSenderHandler is created by the UA through a new method on
1979         RTCPeerConnectionHandler.
1980
1981         Test: fast/mediastream/RTCPeerConnection-dtmf.html
1982
1983         * CMakeLists.txt:
1984         * GNUmakefile.list.am:
1985         * Modules/mediastream/RTCDTMFSender.cpp: Added.
1986         (WebCore):
1987         (WebCore::RTCDTMFSender::create):
1988         (WebCore::RTCDTMFSender::RTCDTMFSender):
1989         (WebCore::RTCDTMFSender::~RTCDTMFSender):
1990         (WebCore::RTCDTMFSender::canInsertDTMF):
1991         (WebCore::RTCDTMFSender::track):
1992         (WebCore::RTCDTMFSender::toneBuffer):
1993         (WebCore::RTCDTMFSender::insertDTMF):
1994         (WebCore::RTCDTMFSender::didPlayTone):
1995         (WebCore::RTCDTMFSender::interfaceName):
1996         (WebCore::RTCDTMFSender::scriptExecutionContext):
1997         (WebCore::RTCDTMFSender::stop):
1998         (WebCore::RTCDTMFSender::eventTargetData):
1999         (WebCore::RTCDTMFSender::ensureEventTargetData):
2000         (WebCore::RTCDTMFSender::scheduleDispatchEvent):
2001         (WebCore::RTCDTMFSender::scheduledEventTimerFired):
2002         * Modules/mediastream/RTCDTMFSender.h: Added.
2003         (WebCore):
2004         (RTCDTMFSender):
2005         (WebCore::RTCDTMFSender::duration):
2006         (WebCore::RTCDTMFSender::interToneGap):
2007         * Modules/mediastream/RTCDTMFSender.idl: Added.
2008         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2009         (WebCore):
2010         (WebCore::RTCDTMFToneChangeEvent::create):
2011         (WebCore::RTCDTMFToneChangeEvent::RTCDTMFToneChangeEvent):
2012         (WebCore::RTCDTMFToneChangeEvent::~RTCDTMFToneChangeEvent):
2013         (WebCore::RTCDTMFToneChangeEvent::tone):
2014         (WebCore::RTCDTMFToneChangeEvent::interfaceName):
2015         * Modules/mediastream/RTCDTMFToneChangeEvent.h: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2016         (WebCore):
2017         (RTCDTMFToneChangeEventInit):
2018         (RTCDTMFToneChangeEvent):
2019         * Modules/mediastream/RTCDTMFToneChangeEvent.idl: Added.
2020         * Modules/mediastream/RTCPeerConnection.cpp:
2021         (WebCore::RTCPeerConnection::createDataChannel):
2022         (WebCore):
2023         (WebCore::RTCPeerConnection::getStreamByTrackId):
2024         (WebCore::RTCPeerConnection::createDTMFSender):
2025         * Modules/mediastream/RTCPeerConnection.h:
2026         (WebCore):
2027         (RTCPeerConnection):
2028         * Modules/mediastream/RTCPeerConnection.idl:
2029         * WebCore.gypi:
2030         * dom/EventNames.h:
2031         (WebCore):
2032         * dom/EventNames.in:
2033         * dom/EventTargetFactory.in:
2034         * platform/chromium/support/WebMediaStreamTrack.cpp:
2035         (WebKit::WebMediaStreamTrack::WebMediaStreamTrack):
2036         (WebKit):
2037         * platform/mediastream/RTCDTMFSenderHandler.h: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2038         (WebCore):
2039         (RTCDTMFSenderHandler):
2040         (WebCore::RTCDTMFSenderHandler::~RTCDTMFSenderHandler):
2041         * platform/mediastream/RTCDTMFSenderHandlerClient.h: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2042         (WebCore):
2043         (RTCDTMFSenderHandlerClient):
2044         (WebCore::RTCDTMFSenderHandlerClient::~RTCDTMFSenderHandlerClient):
2045         * platform/mediastream/RTCPeerConnectionHandler.h:
2046         (WebCore):
2047         (RTCPeerConnectionHandler):
2048         * platform/mediastream/chromium/RTCDTMFSenderHandlerChromium.cpp: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2049         (WebCore):
2050         (WebCore::RTCDTMFSenderHandlerChromium::create):
2051         (WebCore::RTCDTMFSenderHandlerChromium::RTCDTMFSenderHandlerChromium):
2052         (WebCore::RTCDTMFSenderHandlerChromium::~RTCDTMFSenderHandlerChromium):
2053         (WebCore::RTCDTMFSenderHandlerChromium::setClient):
2054         (WebCore::RTCDTMFSenderHandlerChromium::currentToneBuffer):
2055         (WebCore::RTCDTMFSenderHandlerChromium::canInsertDTMF):
2056         (WebCore::RTCDTMFSenderHandlerChromium::insertDTMF):
2057         (WebCore::RTCDTMFSenderHandlerChromium::didPlayTone):
2058         * platform/mediastream/chromium/RTCDTMFSenderHandlerChromium.h: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
2059         (WebCore):
2060         (RTCDTMFSenderHandlerChromium):
2061         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
2062         (WebCore::RTCPeerConnectionHandlerChromium::createDTMFSender):
2063         (WebCore):
2064         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
2065         (RTCPeerConnectionHandlerChromium):
2066
2067 2013-02-04  Kentaro Hara  <haraken@chromium.org>
2068
2069         [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
2070         https://bugs.webkit.org/show_bug.cgi?id=108579
2071
2072         Reviewed by Adam Barth.
2073
2074         Currently V8GCController::m_edenNodes stores a list of nodes whose
2075         wrappers have been created since the latest GC. The reason why we
2076         needed m_edenNodes is that there was no way to know a list of wrappers
2077         in the new space of V8. By using m_edenNodes, we had been approximating
2078         'wrappers in the new space' by 'wrappers that have been created since
2079         the latest GC'.
2080
2081         Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
2082         can know a list of wrappers in the new space. By using the API, we can
2083         remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
2084         need to keep m_edenNodes and that (2) it enables more precise minor
2085         DOM GC (Remember that m_edenNodes was just an approximation).
2086
2087         Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
2088         The benchmark runs 300 iterations, each of which creates 100000 elements.
2089         The benchmark measures average, min, median, max and stdev of execution times
2090         of the 300 iterations. This will tell us the worst-case overhead of this change.
2091
2092         Before:
2093           mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
2094
2095         After:
2096           mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
2097
2098         As shown above, I couldn't observe any performance regression.
2099
2100         No tests. No change in behavior.
2101
2102         * bindings/v8/DOMDataStore.h:
2103         (WebCore::DOMDataStore::setWrapperInObject):
2104         * bindings/v8/DOMWrapperWorld.h:
2105         (DOMWrapperWorld):
2106         (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
2107         * bindings/v8/V8Binding.h:
2108         (WebCore):
2109         (WebCore::worldForEnteredContextIfIsolated):
2110         (WebCore::worldForEnteredContextWithoutContextCheck):
2111         * bindings/v8/V8DOMWindowShell.cpp:
2112         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2113         * bindings/v8/V8GCController.cpp:
2114         (WebCore::gcTree):
2115         (WebCore):
2116         (MinorGCWrapperVisitor):
2117         (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
2118         (WebCore::MinorGCWrapperVisitor::notifyFinished):
2119         (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
2120         (WebCore::V8GCController::gcPrologue):
2121         (WebCore::V8GCController::minorGCPrologue):
2122         (WebCore::V8GCController::majorGCPrologue):
2123         * bindings/v8/V8GCController.h:
2124         (V8GCController):
2125
2126 2013-02-06  Mihai Maerean  <mmaerean@adobe.com>
2127
2128         [CSSRegions] Assertion failure in Node::detach (!renderer || renderer->inRenderFlowThread())
2129         https://bugs.webkit.org/show_bug.cgi?id=104517
2130
2131         Reviewed by Julien Chaffraix.
2132
2133         The RenderObject::inRenderFlowThread bit could have become disconnected from the fact that the RenderObject
2134         has (or not) an enclosing RenderFlowThread.
2135         The cause of this was that, when setting or removing the parent of a RenderObject, the inRenderFlowThread flags
2136         wasn't being set/reset for the children too.
2137         This is now fixed by calling the new setInRenderFlowThreadIncludingDescendants.
2138
2139         The ASSERT was hit for anonymous blocks when detaching the document.
2140
2141         Test: fast/regions/detaching-regions-with-anonymous-blocks.html
2142
2143         * rendering/RenderObject.cpp:
2144         (WebCore::RenderObject::setInRenderFlowThreadRecursive):
2145         (WebCore):
2146         * rendering/RenderObject.h:
2147         (WebCore::RenderObject::setParent):
2148         (RenderObject):
2149
2150 2013-02-06  Marja Hölttä  <marja@chromium.org>
2151
2152         Take referrer policy into account when clearing the referrer header
2153         https://bugs.webkit.org/show_bug.cgi?id=86000
2154
2155         Reviewed by Alexey Proskuryakov.
2156
2157         The referrer should only be cleared when doing a https -> http redirect,
2158         if the policy is "default". Otherwise the referrer should be left intact.
2159
2160         In order to do that, added a function for checking the policy in
2161         NetworkingContext, and stored the NetworkingContext in ResourceHandle
2162         (like some ports already did).
2163
2164         No new tests (unskipped old tests).
2165
2166         * loader/FrameNetworkingContext.h:
2167         (WebCore::FrameNetworkingContext::shouldClearReferrerOnHTTPSToHTTPRedirect):
2168         (FrameNetworkingContext):
2169         * platform/network/BlobResourceHandle.cpp:
2170         (WebCore::BlobResourceHandle::BlobResourceHandle):
2171         * platform/network/NetworkingContext.h:
2172         (NetworkingContext):
2173         * platform/network/ResourceHandle.cpp:
2174         (WebCore::ResourceHandle::ResourceHandle):
2175         (WebCore::ResourceHandle::create):
2176         (WebCore::ResourceHandle::context):
2177         (WebCore):
2178         * platform/network/ResourceHandle.h:
2179         (ResourceHandle):
2180         * platform/network/ResourceHandleInternal.h:
2181         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2182         (ResourceHandleInternal):
2183         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
2184         (WebCore::ResourceHandle::start):
2185         (WebCore::ResourceHandle::loadResourceSynchronously):
2186         * platform/network/cf/ResourceHandleCFNet.cpp:
2187         (WebCore::willSendRequest):
2188         (WebCore::ResourceHandle::start):
2189         (WebCore::ResourceHandle::loadResourceSynchronously):
2190         * platform/network/chromium/ResourceHandle.cpp:
2191         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2192         (WebCore::ResourceHandle::ResourceHandle):
2193         (WebCore::ResourceHandle::create):
2194         (WebCore::ResourceHandle::context):
2195         (WebCore):
2196         (WebCore::ResourceHandle::start):
2197         * platform/network/chromium/ResourceHandleInternal.h:
2198         (WebCore):
2199         (ResourceHandleInternal):
2200         (WebCore::ResourceHandleInternal::context):
2201         * platform/network/curl/ResourceHandleCurl.cpp:
2202         (WebCore::ResourceHandle::start):
2203         (WebCore::ResourceHandle::loadResourceSynchronously):
2204         * platform/network/mac/ResourceHandleMac.mm:
2205         (WebCore::ResourceHandle::start):
2206         (WebCore::ResourceHandle::loadResourceSynchronously):
2207         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
2208         * platform/network/qt/QNetworkReplyHandler.cpp:
2209         (WebCore::QNetworkReplyHandler::redirect):
2210         * platform/network/qt/ResourceHandleQt.cpp:
2211         (WebCore::ResourceHandle::start):
2212         (WebCore::ResourceHandle::loadResourceSynchronously):
2213         * platform/network/soup/ResourceHandleSoup.cpp:
2214         (WebCore::doRedirect):
2215         (WebCore::ResourceHandle::start):
2216         * platform/network/win/ResourceHandleWin.cpp:
2217         (WebCore::ResourceHandle::start):
2218         (WebCore::ResourceHandle::loadResourceSynchronously):
2219
2220 2013-02-06  Pavel Feldman  <pfeldman@chromium.org>
2221
2222         Web Inspector: file selector list jumps as I type or move Up/Down
2223         https://bugs.webkit.org/show_bug.cgi?id=108933
2224
2225         Reviewed by Vsevolod Vlasov.
2226
2227         Missing return was scheduling extra updates.
2228
2229         * inspector/front-end/FilteredItemSelectionDialog.js:
2230         (WebInspector.FilteredItemSelectionDialog):
2231         (WebInspector.FilteredItemSelectionDialog.prototype._filterItems):
2232         (WebInspector.FilteredItemSelectionDialog.prototype._onKeyDown):
2233         (WebInspector.FilteredItemSelectionDialog.prototype._updateSelection):
2234
2235 2013-02-06  Kentaro Hara  <haraken@chromium.org>
2236
2237         [V8] Pass an Isolate to remaining GetTemplate()s
2238         https://bugs.webkit.org/show_bug.cgi?id=109001
2239
2240         Reviewed by Adam Barth.
2241
2242         No tests. No change in behavior.
2243
2244         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2245         (WebCore::V8DOMWindow::namedSecurityCheck): Because this method is a callback from V8,
2246         we cannot change its signature to receive an Isolate.
2247         (WebCore::V8DOMWindow::indexedSecurityCheck): Ditto.
2248
2249         * bindings/scripts/CodeGeneratorV8.pm:
2250         (GenerateHeader):
2251         (GenerateToV8Converters):
2252         * bindings/scripts/test/V8/V8Float64Array.cpp:
2253         (WebCore::V8Float64Array::createWrapper):
2254         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2255         (WebCore::V8TestActiveDOMObject::createWrapper):
2256         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2257         (WebCore::V8TestCustomNamedGetter::createWrapper):
2258         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2259         (WebCore::V8TestEventConstructor::createWrapper):
2260         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2261         (WebCore::V8TestEventTarget::createWrapper):
2262         * bindings/scripts/test/V8/V8TestException.cpp:
2263         (WebCore::V8TestException::createWrapper):
2264         * bindings/scripts/test/V8/V8TestInterface.cpp:
2265         (WebCore::V8TestInterface::createWrapper):
2266         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2267         (WebCore::V8TestMediaQueryListListener::createWrapper):
2268         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2269         (WebCore::V8TestNamedConstructor::createWrapper):
2270         * bindings/scripts/test/V8/V8TestNode.cpp:
2271         (WebCore::V8TestNode::createWrapper):
2272         * bindings/scripts/test/V8/V8TestObj.cpp:
2273         (WebCore::V8TestObj::createWrapper):
2274         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2275         (WebCore::V8TestOverloadedConstructors::createWrapper):
2276         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2277         (WebCore::V8TestSerializedScriptValueInterface::createWrapper):
2278         * bindings/v8/V8DOMWrapper.cpp:
2279         (WebCore::V8DOMWrapper::createWrapper):
2280         * bindings/v8/V8DOMWrapper.h:
2281         (V8DOMWrapper):
2282         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2283         (WebCore::V8HTMLDocument::wrapInShadowObject):
2284
2285 2013-02-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2286
2287         Unreviewed, rolling out r141961.
2288         http://trac.webkit.org/changeset/141961
2289         https://bugs.webkit.org/show_bug.cgi?id=109019
2290
2291         assertion failures on svn tests such as fonts-glyph-04-t.svg
2292         (Requested by falken on #webkit).
2293
2294         * platform/graphics/GlyphPage.h:
2295         (WebCore::GlyphPage::create):
2296         (WebCore::GlyphPage::glyphDataForCharacter):
2297         (WebCore::GlyphPage::glyphDataForIndex):
2298         (WebCore::GlyphPage::fontDataForCharacter):
2299         (WebCore::GlyphPage::setGlyphDataForIndex):
2300         (GlyphPage):
2301         (WebCore::GlyphPage::copyFrom):
2302         (WebCore::GlyphPage::clear):
2303         (WebCore::GlyphPage::clearForFontData):
2304         (WebCore::GlyphPage::GlyphPage):
2305         * platform/graphics/GlyphPageTreeNode.cpp:
2306         (WebCore::GlyphPageTreeNode::initializePage):
2307
2308 2013-02-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2309
2310         Unreviewed, rolling out r141964.
2311         http://trac.webkit.org/changeset/141964
2312         https://bugs.webkit.org/show_bug.cgi?id=109014
2313
2314         caused performance regression (Requested by hayato on
2315         #webkit).
2316
2317         * CMakeLists.txt:
2318         * GNUmakefile.list.am:
2319         * Target.pri:
2320         * WebCore.gypi:
2321         * WebCore.xcodeproj/project.pbxproj:
2322         * css/CSSAllInOne.cpp:
2323         * css/DocumentRuleSets.cpp: Removed.
2324         * css/DocumentRuleSets.h: Removed.
2325         * css/StyleResolver.cpp:
2326         (WebCore::StyleResolver::StyleResolver):
2327         (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
2328         (WebCore):
2329         (WebCore::makeRuleSet):
2330         (WebCore::StyleResolver::resetAuthorStyle):
2331         (WebCore::StyleResolver::appendAuthorStyleSheets):
2332         (WebCore::StyleResolver::matchAuthorRules):
2333         (WebCore::StyleResolver::matchUserRules):
2334         (WebCore::StyleResolver::classNamesAffectedByRules):
2335         (WebCore::StyleResolver::locateCousinList):
2336         (WebCore::StyleResolver::canShareStyleWithElement):
2337         (WebCore::StyleResolver::locateSharedStyle):
2338         (WebCore::StyleResolver::styleForElement):
2339         (WebCore::StyleResolver::styleForPage):
2340         (WebCore::StyleResolver::checkRegionStyle):
2341         (WebCore::StyleResolver::applyProperty):
2342         (WebCore::StyleResolver::collectFeatures):
2343         (WebCore::StyleResolver::reportMemoryUsage):
2344         * css/StyleResolver.h:
2345         (StyleResolver):
2346         (WebCore::StyleResolver::usesSiblingRules):
2347         (WebCore::StyleResolver::usesFirstLineRules):
2348         (WebCore::StyleResolver::usesBeforeAfterRules):
2349         (WebCore::StyleResolver::hasSelectorForAttribute):
2350         (WebCore::StyleResolver::hasSelectorForClass):
2351         (WebCore::StyleResolver::hasSelectorForId):
2352         * dom/DocumentStyleSheetCollection.cpp:
2353         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2354
2355 2013-02-05  Kentaro Hara  <haraken@chromium.org>
2356
2357         Add #if USE(V8) to Node::V8CollectableDuringMinorGCFlag
2358         https://bugs.webkit.org/show_bug.cgi?id=109009
2359
2360         Reviewed by Kent Tamura.
2361
2362         Node flags should be saved. V8CollectableDuringMinorGCFlag is used by V8 only.
2363
2364         * dom/Node.h:
2365         (Node):
2366
2367 2013-02-05  Vsevolod Vlasov  <vsevik@chromium.org>
2368
2369         Web Inspector: Add ending slashes automatically to file mappings.
2370         https://bugs.webkit.org/show_bug.cgi?id=108936
2371
2372         Reviewed by Pavel Feldman.
2373
2374         * inspector/front-end/SettingsScreen.js:
2375         (WebInspector.WorkspaceSettingsTab.prototype._addFileMappingClicked):
2376
2377 2013-02-05  Eric Carlson  <eric.carlson@apple.com>
2378
2379         More updates to Caption user preferences
2380         https://bugs.webkit.org/show_bug.cgi?id=108997
2381
2382         Reviewed by Dean Jackson.
2383
2384         * html/HTMLMediaElement.cpp:
2385         (WebCore::HTMLMediaElement::captionPreferencesChanged): Give the media controls a chance
2386             to update for a preferences change.
2387         * html/shadow/MediaControlElements.cpp:
2388         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Add optional "force update" 
2389             param to force font size recalc even when the video size hasn't changed.
2390         * html/shadow/MediaControlElements.h:
2391
2392         * html/shadow/MediaControls.cpp:
2393         (WebCore::MediaControls::textTrackPreferencesChanged): New, force a font size recalc.
2394         * html/shadow/MediaControls.h:
2395
2396         * html/track/TextTrackCueGeneric.cpp:
2397         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Don't set width/size of cues
2398             that use default positioning. Use "start" as the default alignment.
2399
2400         * page/CaptionUserPreferencesMac.mm:
2401         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Set padding when the window is visible
2402             so it shows around the cue background.
2403         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Set padding to 0 when the background
2404             is visible.
2405         (WebCore::CaptionUserPreferencesMac::windowRoundedCornerRadiusCSS): Add "px" to the border radius
2406             so it actually works.
2407         * rendering/RenderTextTrackCue.cpp:
2408         (WebCore::RenderTextTrackCue::layout): Special case generic cues with default style.
2409         (WebCore::RenderTextTrackCue::repositionGenericCue):
2410         * rendering/RenderTextTrackCue.h:
2411
2412 2013-02-05  Hayato Ito  <hayato@chromium.org>
2413
2414         Split each RuleSet and feature out from StyleResolver into its own class.
2415         https://bugs.webkit.org/show_bug.cgi?id=107777
2416
2417         Reviewed by Dimitri Glazkov.
2418
2419         Splitting each RuleSet and feature out from StyleResover into its onw class, DocumentRuleSets,
2420         to manage them separately.
2421
2422         This is one of the attempts to try to resolve meta bug (bug 89879)
2423         to lose StyleResolver's weight.  We need further action to factor
2424         StyleResolver to separate it into some classes cleanly.
2425         See also https://bugs.webkit.org/show_bug.cgi?id=108890. A following patch will address that.
2426
2427         No tests. No change in behavior.
2428
2429         * CMakeLists.txt:
2430         * GNUmakefile.list.am:
2431         * Target.pri:
2432         * WebCore.gypi:
2433         * WebCore.xcodeproj/project.pbxproj:
2434         * css/CSSAllInOne.cpp:
2435         * css/DocumentRuleSets.cpp: Added.
2436         (WebCore):
2437         (WebCore::DocumentRuleSets::DocumentRuleSets):
2438         (WebCore::DocumentRuleSets::~DocumentRuleSets):
2439         (WebCore::DocumentRuleSets::initUserStyle): New helper to initialize each RuleSets.
2440         (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets): Factored out from StyleResolver.
2441         (WebCore::makeRuleSet): Ditto.
2442         (WebCore::DocumentRuleSets::resetAuthorStyle): Ditto.
2443         (WebCore::DocumentRuleSets::appendAuthorStyleSheets): Ditto.
2444         (WebCore::DocumentRuleSets::collectFeatures): Ditto.
2445         (WebCore::DocumentRuleSets::reportMemoryUsage): New methods to report memory usage. Factored out from StyleResolver.
2446         * css/DocumentRuleSets.h: Added.
2447         (WebCore):
2448         (DocumentRuleSets):
2449         (WebCore::DocumentRuleSets::authorStyle): Moved from StyleResolver.
2450         (WebCore::DocumentRuleSets::userStyle): Ditto.
2451         (WebCore::DocumentRuleSets::features): Ditto.
2452         (WebCore::DocumentRuleSets::sibling): Ditto.
2453         (WebCore::DocumentRuleSets::uncommonAttribute): Ditto.
2454         * css/StyleResolver.cpp:
2455         (WebCore::StyleResolver::StyleResolver):
2456         (WebCore::StyleResolver::appendAuthorStyleSheets): Now calls DocumentRuleSets::appendAuthorStyleSheets.
2457         (WebCore::StyleResolver::matchAuthorRules): Use m_ruleSets.
2458         (WebCore::StyleResolver::matchUserRules): Ditto.
2459         (WebCore::StyleResolver::classNamesAffectedByRules): Ditto.
2460         (WebCore::StyleResolver::locateCousinList): Ditto.
2461         (WebCore::StyleResolver::canShareStyleWithElement): Ditto.
2462         (WebCore::StyleResolver::locateSharedStyle): Ditto.
2463         (WebCore::StyleResolver::styleForPage): Ditto.
2464         (WebCore::StyleResolver::checkRegionStyle): Ditto.
2465         (WebCore::StyleResolver::applyProperty): Ditto.
2466         (WebCore::StyleResolver::reportMemoryUsage): Now calls DocumentRuleSets::reportMemoryUsage.
2467         * css/StyleResolver.h:
2468         (WebCore::StyleResolver::scopeResolver):
2469         (StyleResolver):
2470         (WebCore::StyleResolver::ruleSets): accessor r to DocumentRuleSets.
2471         (WebCore::StyleResolver::usesSiblingRules): Use m_ruleSets.
2472         (WebCore::StyleResolver::usesFirstLineRules): Ditto.
2473         (WebCore::StyleResolver::usesBeforeAfterRules): Ditto.
2474         (WebCore::StyleResolver::hasSelectorForAttribute): Ditto.
2475         (WebCore::StyleResolver::hasSelectorForClass): Ditto.
2476         (WebCore::StyleResolver::hasSelectorForId): Ditto.
2477         * dom/DocumentStyleSheetCollection.cpp:
2478         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2479
2480 2013-02-05  Julien Chaffraix  <jchaffraix@webkit.org>
2481
2482         [CSS Grid Layout] Grid item's logical height is not properly recomputed after -webkit-grid-column / -webkit-grid-row changes
2483         https://bugs.webkit.org/show_bug.cgi?id=108975
2484
2485         Reviewed by Tony Chang.
2486
2487         Test: fast/css-grid-layout/implicit-position-dynamic-change.html
2488
2489         * rendering/RenderBox.cpp:
2490         (WebCore::RenderBox::clearContainingBlockOverrideSize):
2491         (WebCore::RenderBox::clearOverrideContainingBlockContentLogicalHeight):
2492         * rendering/RenderBox.h:
2493         Added clearOverrideContainingBlockContentLogicalHeight and updated clearContainingBlockOverrideSize
2494         to use it.
2495
2496         * rendering/RenderGrid.cpp:
2497         (WebCore::RenderGrid::minContentForChild):
2498         (WebCore::RenderGrid::maxContentForChild):
2499         Added missing clearContainingBlockOverrideSize to ensure we don't use a previous layout's override.
2500
2501 2013-02-05  Andreas Kling  <akling@apple.com>
2502
2503         Optimize GlyphPage for case where all glyphs are available in the same font.
2504         <http://webkit.org/b/108835>
2505         <rdar://problem/13157042>
2506
2507         Reviewed by Antti Koivisto.
2508
2509         Let GlyphPage begin optimistically assuming that all its glyphs will be represented in
2510         the same SimpleFontData*. In this (very common) case, only keep a single SimpleFontData*.
2511
2512         If glyphs from multiple fonts are mixed in one page, an array of per-glyph SimpleFontData*
2513         is allocated transparently.
2514
2515         4.98 MB progression on Membuster3.
2516
2517         * platform/graphics/GlyphPageTreeNode.cpp:
2518         (WebCore::GlyphPageTreeNode::initializePage):
2519         * platform/graphics/GlyphPage.h:
2520         (WebCore::GlyphPage::createUninitialized):
2521         (WebCore::GlyphPage::createZeroedSystemFallbackPage):
2522         (WebCore::GlyphPage::createCopiedSystemFallbackPage):
2523
2524             There are now three ways of constructing a GlyphPage, two of them are only used for
2525             creating system fallback pages.
2526
2527         (WebCore::GlyphPage::setGlyphDataForIndex):
2528
2529             Hold off creating a SimpleFontData* array until we're sure there are two different
2530             SimpleFontData* backing the glyphs in this page.
2531             We don't store font data for glyph #0, instead we let the getters always return null for it.
2532
2533         (WebCore::GlyphPage::~GlyphPage):
2534
2535             Free the SimpleFontData* array if needed.
2536
2537         (WebCore::GlyphPage::glyphDataForCharacter):
2538         (WebCore::GlyphPage::glyphDataForIndex):
2539         (WebCore::GlyphPage::fontDataForCharacter):
2540
2541             The font data for glyph #0 is always a null pointer now.
2542
2543         (WebCore::GlyphPage::clearForFontData):
2544
2545             Updated for new storage format.
2546
2547 2013-02-05  Kent Tamura  <tkent@chromium.org>
2548
2549         INPUT_MULTIPLE_FIELDS_UI: Read-only inputs should be focusable
2550         https://bugs.webkit.org/show_bug.cgi?id=108795
2551
2552         Reviewed by Kentaro Hara.
2553
2554         According to the standard [1], readonly form controls should be focusable.
2555
2556         - Sub-fields should be focusable if they are read-only. We should check
2557           isDisabled mainly.
2558         - All keyboard operations should not be handled if a field is disabled,
2559           and focus navigation keyboard operations should be handled even if a
2560           field is read-only.
2561
2562         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-readonly-attribute
2563
2564         No new tests. Update
2565         fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html
2566         for the new behavior.
2567
2568         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2569         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isKeyboardFocusable):
2570         Make <input> focusable even if it is read-only.
2571         * html/shadow/DateTimeEditElement.cpp:
2572         (WebCore::DateTimeEditElement::isFieldOwnerDisabled):
2573         Separate isFieldOwnerDisabledOrReadOnly into two.
2574         (WebCore::DateTimeEditElement::isFieldOwnerReadOnly): Ditto.
2575         (WebCore::DateTimeEditElement::updateUIState):
2576         We don't need to focus out if this is read-only.
2577         * html/shadow/DateTimeEditElement.h:
2578         (DateTimeEditElement): Separate isFieldOwnerDisabledOrReadOnly into two.
2579         * html/shadow/DateTimeFieldElement.cpp:
2580         (WebCore::DateTimeFieldElement::defaultEventHandler):
2581         Skip handleKeyboardEvent if the field is disabled or the owner input is
2582         disabled or read-only. handleKeyboardEvent handles editing key
2583         operations.
2584         (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler):
2585         If this field is disabled or the owner input is disabled, all keyboard
2586         inputs are ignored.
2587         If this field is read-only, we handle only left and right arrows to
2588         change focus, and skip down/up/backspace/del keys.
2589         (WebCore::DateTimeFieldElement::isFieldOwnerDisabled):
2590         A helper function to check disable state of the owner input.
2591         (WebCore::DateTimeFieldElement::isFieldOwnerReadOnly):
2592         A helper function to check read-only state of the owner input.
2593         (WebCore::DateTimeFieldElement::isFocusable):
2594         This field should be focusable if it is read-only and not disabled.
2595         * html/shadow/DateTimeFieldElement.h:
2596         (FieldOwner): Separate isFieldOwnerDisabledOrReadOnly into two.
2597         (DateTimeFieldElement):
2598         Declare isFieldOwnerDisabled and isFieldOwnerReadOnly.
2599         * html/shadow/DateTimeNumericFieldElement.cpp:
2600         (WebCore::DateTimeNumericFieldElement::handleKeyboardEvent):
2601         Remove redundant isDisabled check. It is done in
2602         DateTimeFieldElement::defaultEventHandler.
2603
2604 2013-02-05  Eric Carlson  <eric.carlson@apple.com>
2605
2606         [Mac] Complete plumbing so captions menu can indicate track type
2607         https://bugs.webkit.org/show_bug.cgi?id=108994
2608
2609         Reviewed by Dean Jackson.
2610
2611         Plumb "isClosedCaptions" through to the Mac media engine.
2612
2613         Updated media/video-controls-captions-trackmenu-localized.html and results.
2614
2615         * html/track/InbandTextTrack.cpp:
2616         (WebCore::InbandTextTrack::isClosedCaptions): New, pass the call through to the private track.
2617         * html/track/InbandTextTrack.h:
2618         (InbandTextTrack):
2619         * html/track/TextTrack.cpp:
2620         (WebCore::TextTrack::TextTrack): Lose the member variable, this won't be accessed often enough
2621             to make it worth caching the value.
2622         * html/track/TextTrack.h:
2623         (WebCore::TextTrack::isClosedCaptions): Make virtual so derived classes can oveerride.
2624         * platform/graphics/InbandTextTrackPrivate.h:
2625         (WebCore::InbandTextTrackPrivate::isClosedCaptions): New.
2626         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
2627         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2628         (WebCore::InbandTextTrackPrivateAVFObjC::isClosedCaptions): New.
2629
2630 2013-02-05  Mark Lam  <mark.lam@apple.com>
2631
2632         Change DatabaseTask and DatabaseThread to work with DatabaseBackendAsync
2633         instead of Database.
2634         https://bugs.webkit.org/show_bug.cgi?id=108995.
2635
2636         Reviewed by Sam Weinig.
2637
2638         This change also moves the task inner classes from Database to
2639         DatabaseBackendAsync.
2640
2641         No new tests.
2642
2643         * Modules/webdatabase/Database.cpp:
2644         (WebCore::Database::from):
2645         * Modules/webdatabase/Database.h:
2646         (Database):
2647         * Modules/webdatabase/DatabaseBackend.h:
2648         (DatabaseBackend):
2649         * Modules/webdatabase/DatabaseBackendAsync.h:
2650         (DatabaseBackendAsync):
2651         * Modules/webdatabase/DatabaseTask.cpp:
2652         (WebCore::DatabaseTask::DatabaseTask):
2653         (WebCore::DatabaseBackendAsync::DatabaseOpenTask::DatabaseOpenTask):
2654         (WebCore::DatabaseBackendAsync::DatabaseOpenTask::doPerformTask):
2655         (WebCore::DatabaseBackendAsync::DatabaseOpenTask::debugTaskName):
2656         (WebCore::DatabaseBackendAsync::DatabaseCloseTask::DatabaseCloseTask):
2657         (WebCore::DatabaseBackendAsync::DatabaseCloseTask::doPerformTask):
2658         (WebCore::DatabaseBackendAsync::DatabaseCloseTask::debugTaskName):
2659         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask):
2660         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask):
2661         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::debugTaskName):
2662         (WebCore::DatabaseBackendAsync::DatabaseTableNamesTask::DatabaseTableNamesTask):
2663         (WebCore::DatabaseBackendAsync::DatabaseTableNamesTask::doPerformTask):
2664         (WebCore::DatabaseBackendAsync::DatabaseTableNamesTask::debugTaskName):
2665         * Modules/webdatabase/DatabaseTask.h:
2666         (WebCore::DatabaseTask::database):
2667         (DatabaseTask):
2668         (WebCore::DatabaseBackendAsync::DatabaseOpenTask::create):
2669         (DatabaseBackendAsync::DatabaseOpenTask):
2670         (WebCore::DatabaseBackendAsync::DatabaseCloseTask::create):
2671         (DatabaseBackendAsync::DatabaseCloseTask):
2672         (WebCore::DatabaseBackendAsync::DatabaseTableNamesTask::create):
2673         (DatabaseBackendAsync::DatabaseTableNamesTask):
2674         * Modules/webdatabase/DatabaseThread.cpp:
2675         (WebCore::DatabaseThread::databaseThread):
2676         (WebCore::DatabaseThread::recordDatabaseOpen):
2677         (WebCore::DatabaseThread::recordDatabaseClosed):
2678         (WebCore::SameDatabasePredicate::SameDatabasePredicate):
2679         (SameDatabasePredicate):
2680         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
2681         * Modules/webdatabase/DatabaseThread.h:
2682         (DatabaseThread):
2683
2684 2013-02-05  Mark Lam  <mark.lam@apple.com>
2685
2686         Rename ENUM_CLASS_BEGIN() macro to ENUM_CLASS(), and make DatabaseType a strong enum.
2687         https://bugs.webkit.org/show_bug.cgi?id=108988.
2688
2689         Reviewed by Alexey Proskuryakov.
2690
2691         No new tests.
2692
2693         * Modules/webdatabase/DatabaseBackend.cpp:
2694         (WebCore::DatabaseBackend::DatabaseBackend):
2695         * Modules/webdatabase/DatabaseBackend.h:
2696         (DatabaseBackend):
2697         * Modules/webdatabase/DatabaseBackendAsync.cpp:
2698         (WebCore::DatabaseBackendAsync::DatabaseBackendAsync):
2699         * Modules/webdatabase/DatabaseBackendSync.cpp:
2700         (WebCore::DatabaseBackendSync::DatabaseBackendSync):
2701         * Modules/webdatabase/DatabaseBasicTypes.h:
2702         (WebCore::ENUM_CLASS):
2703         * Modules/webdatabase/DatabaseError.h:
2704         (WebCore::ENUM_CLASS):
2705
2706 2013-02-05  Kentaro Hara  <haraken@chromium.org>
2707
2708         [V8] Remove deprecatedV8String() and deprecatedV8Integer()
2709         https://bugs.webkit.org/show_bug.cgi?id=108919
2710
2711         Reviewed by Adam Barth.
2712
2713         No tests. No change in behavior.
2714
2715         * bindings/v8/V8Binding.cpp:
2716         (WebCore::toXPathNSResolver):
2717         * bindings/v8/V8Binding.h:
2718         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
2719         (WebCore::V8CustomXPathNSResolver::create):
2720         (WebCore::V8CustomXPathNSResolver::V8CustomXPathNSResolver):
2721         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2722         * bindings/v8/custom/V8CustomXPathNSResolver.h:
2723         (V8CustomXPathNSResolver):
2724
2725 2013-02-05   Vineet Chaudhary  <rgf748@motorola.com>
2726
2727         formenctype to have empty string as default value.
2728         https://bugs.webkit.org/show_bug.cgi?id=108969
2729
2730         Reviewed by Kent Tamura.
2731
2732         The spec says formEnctype should only have an invalid value default, not a missing value default.
2733         Spec: http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-formenctype
2734               http://www.whatwg.org/specs/web-apps/current-work/#attr-fs-formenctype
2735
2736         No new tests. Covered by existing test case fast/forms/submit-form-attributes.html
2737
2738         * html/HTMLFormControlElement.cpp: For the missing formEnctype attr return empty string.
2739         (WebCore::HTMLFormControlElement::formEnctype):
2740
2741 2013-02-04  Kentaro Hara  <haraken@chromium.org>
2742
2743         [V8] Reduce usage of deprecatedString() and deprecatedInteger()
2744         https://bugs.webkit.org/show_bug.cgi?id=108909
2745
2746         Reviewed by Adam Barth.
2747
2748         By passing an Isolate parameter around, we can reduce usage of
2749         deprecated methods.
2750
2751         No tests. No change in behavior.
2752
2753         * bindings/scripts/CodeGeneratorV8.pm:
2754         (GenerateNormalAttrSetter):
2755         (GenerateEventListenerCallback):
2756         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2757         (WebCore::TestEventTargetV8Internal::addEventListenerCallback):
2758         (WebCore::TestEventTargetV8Internal::removeEventListenerCallback):
2759         * bindings/scripts/test/V8/V8TestObj.cpp:
2760         (WebCore::TestObjV8Internal::addEventListenerCallback):
2761         (WebCore::TestObjV8Internal::removeEventListenerCallback):
2762         * bindings/v8/IDBBindingUtilities.cpp:
2763         (WebCore::get):
2764         (WebCore::set):
2765         (WebCore::getNthValueOnKeyPath):
2766         (WebCore::canInjectNthValueOnKeyPath):
2767         (WebCore::ensureNthValueOnKeyPath):
2768         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
2769         (WebCore::injectIDBKeyIntoScriptValue):
2770         (WebCore::canInjectIDBKeyIntoScriptValue):
2771         * bindings/v8/NPV8Object.cpp:
2772         (WebCore::createValueListFromVariantArgs):
2773         (_NPN_Invoke):
2774         (_NPN_InvokeDefault):
2775         (_NPN_SetProperty):
2776         (_NPN_Construct):
2777         * bindings/v8/ScriptController.cpp:
2778         (WebCore::ScriptController::compileAndRunScript):
2779         * bindings/v8/ScriptProfiler.cpp:
2780         (WebCore):
2781         (WebCore::ScriptProfiler::takeHeapSnapshot):
2782         * bindings/v8/ScriptSourceCode.cpp:
2783         (WebCore::ScriptSourceCode::compileScript):
2784         * bindings/v8/ScriptSourceCode.h:
2785         (ScriptSourceCode):
2786         * bindings/v8/V8LazyEventListener.cpp:
2787         (WebCore::V8LazyEventListener::prepareListenerObject):
2788         * bindings/v8/V8NPObject.cpp:
2789         (WebCore::npObjectInvokeImpl):
2790         (WebCore::npObjectGetProperty):
2791         * bindings/v8/V8NPUtils.cpp:
2792         (WebCore::convertNPVariantToV8Object):
2793         * bindings/v8/V8NPUtils.h:
2794         (WebCore):
2795         * bindings/v8/V8Utilities.cpp:
2796         (WebCore::createHiddenDependency):
2797         (WebCore::removeHiddenDependency):
2798         (WebCore::transferHiddenDependency):
2799         * bindings/v8/V8Utilities.h:
2800         (WebCore):
2801         * bindings/v8/WorkerScriptController.cpp:
2802         (WebCore::WorkerScriptController::evaluate):
2803         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2804         (WebCore::V8DOMWindow::addEventListenerCallback):
2805         (WebCore::V8DOMWindow::removeEventListenerCallback):
2806
2807 2013-02-05  Kentaro Hara  <haraken@chromium.org>
2808
2809         [V8] Make an Isolate parameter mandatory in HasInstance()
2810         https://bugs.webkit.org/show_bug.cgi?id=108917
2811
2812         Reviewed by Adam Barth.
2813
2814         No tests. No change in behavior.
2815
2816         * bindings/scripts/CodeGeneratorV8.pm:
2817         (GenerateHeader):
2818         (GenerateImplementation):
2819         * bindings/scripts/test/V8/V8Float64Array.cpp:
2820         (WebCore::V8Float64Array::HasInstance):
2821         * bindings/scripts/test/V8/V8Float64Array.h:
2822         (V8Float64Array):
2823         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2824         (WebCore::V8TestActiveDOMObject::HasInstance):
2825         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2826         (V8TestActiveDOMObject):
2827         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2828         (WebCore::V8TestCustomNamedGetter::HasInstance):
2829         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2830         (V8TestCustomNamedGetter):
2831         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2832         (WebCore::V8TestEventConstructor::HasInstance):
2833         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2834         (V8TestEventConstructor):
2835         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2836         (WebCore::V8TestEventTarget::HasInstance):
2837         * bindings/scripts/test/V8/V8TestEventTarget.h:
2838         (V8TestEventTarget):
2839         * bindings/scripts/test/V8/V8TestException.cpp:
2840         (WebCore::V8TestException::HasInstance):
2841         * bindings/scripts/test/V8/V8TestException.h:
2842         (V8TestException):
2843         * bindings/scripts/test/V8/V8TestInterface.cpp:
2844         (WebCore::V8TestInterface::HasInstance):
2845         * bindings/scripts/test/V8/V8TestInterface.h:
2846         (V8TestInterface):
2847         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2848         (WebCore::V8TestMediaQueryListListener::HasInstance):
2849         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2850         (V8TestMediaQueryListListener):
2851         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2852         (WebCore::V8TestNamedConstructor::HasInstance):
2853         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2854         (V8TestNamedConstructor):
2855         * bindings/scripts/test/V8/V8TestNode.cpp:
2856         (WebCore::V8TestNode::HasInstance):
2857         * bindings/scripts/test/V8/V8TestNode.h:
2858         (V8TestNode):
2859         * bindings/scripts/test/V8/V8TestObj.cpp:
2860         (WebCore::V8TestObj::HasInstance):
2861         * bindings/scripts/test/V8/V8TestObj.h:
2862         (V8TestObj):
2863         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2864         (WebCore::V8TestOverloadedConstructors::HasInstance):
2865         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
2866         (V8TestOverloadedConstructors):
2867         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2868         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
2869         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2870         (V8TestSerializedScriptValueInterface):
2871         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2872         (WebCore::toWebGLUniformLocation):
2873
2874 2013-02-05  Kentaro Hara  <haraken@chromium.org>
2875
2876         [JSC] Clean up CodeGeneratorJS.pm by introducing HasCustom{Getter,Setter,Method}
2877         https://bugs.webkit.org/show_bug.cgi?id=108898
2878
2879         Reviewed by Sam Weinig.
2880
2881         No tests. No change in behavior.
2882
2883         * bindings/scripts/CodeGeneratorJS.pm:
2884         (GenerateHeader):
2885         (GenerateImplementation):
2886         (HasCustomGetter):
2887         (HasCustomSetter):
2888         (HasCustomMethod):
2889
2890 2013-02-05  Dana Jansens  <danakj@chromium.org>
2891
2892         [chromium] Provide compositor offscreen context through the WebLayerTreeViewClient interface
2893         https://bugs.webkit.org/show_bug.cgi?id=107776
2894
2895         Reviewed by James Robinson.
2896
2897         Allow the compositor thread's context to be retrieved on either thread,
2898         so the main thread can create and pass the context to the impl thread
2899         via its own mechanisms.
2900
2901         Move the code to bind the GrGLInterface to a WebGraphicsContext3D into
2902         chromium's GraphicsContext3DPrivate. The chromium-side code will need
2903         to implement this code itself.
2904
2905         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
2906         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2907         (WebCore):
2908         (WebCore::GraphicsContext3DPrivate::grContext):
2909         * platform/chromium/support/GraphicsContext3DPrivate.h:
2910         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
2911         (WebCore::SharedGraphicsContext3D::getForImplThread):
2912
2913 2013-02-05  Tony Gentilcore  <tonyg@chromium.org>
2914
2915         Continue making XSSAuditor thread safe: Remove dependency on the parser's tokenizer
2916         https://bugs.webkit.org/show_bug.cgi?id=108666
2917
2918         Reviewed by Adam Barth.
2919
2920         This is the final dependency on the parser, so we remove that as well. Yay!
2921
2922         No new tests because no new functionality.
2923
2924         * html/parser/HTMLDocumentParser.cpp:
2925         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
2926         (WebCore::HTMLDocumentParser::pumpTokenizer): Pass m_tokenizer->shouldAllowCDATA()
2927         * html/parser/XSSAuditor.cpp:
2928         (WebCore::XSSAuditor::XSSAuditor): Remove isMainThread() check because we have one in init() anyway.
2929         Move m_isEnabled and m_documentURL initialization to init() because we have a Document* there.
2930         (WebCore::XSSAuditor::init):
2931         (WebCore::XSSAuditor::filterToken):
2932         (WebCore::XSSAuditor::filterStartToken):
2933         (WebCore::XSSAuditor::filterEndToken):
2934         (WebCore::XSSAuditor::filterScriptToken):
2935         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
2936         * html/parser/XSSAuditor.h:
2937         (WebCore::FilterTokenRequest::FilterTokenRequest):
2938         (FilterTokenRequest):
2939         (XSSAuditor):
2940
2941 2013-02-05  Enrica Casucci  <enrica@apple.com>
2942
2943         Make baseWritingDirectionForSelectionStart available to all platforms in the Editor class.
2944         https://bugs.webkit.org/show_bug.cgi?id=108977.
2945
2946         Reviewed by Ryosuke Niwa.
2947         
2948         Now that baseWritingDirectionForSelectionStart doesn't use
2949         platform specific type anymore, we can make it available for
2950         all platforms. This way it can be used for iOS as well.
2951
2952         No new tests, no functionality change.
2953
2954         * editing/Editor.cpp:
2955         (WebCore::Editor::baseWritingDirectionForSelectionStart): Added.
2956         * editing/Editor.h: Moved from PLATFORM(MAC).
2957         * editing/mac/EditorMac.mm: baseWritingDirectionForSelectionStart removed.
2958
2959 2013-02-05  Benjamin Poulain  <bpoulain@apple.com>
2960
2961         Avoid String->AtomicString conversion in Attr::childrenChanged()
2962         https://bugs.webkit.org/show_bug.cgi?id=108742
2963
2964         Reviewed by Andreas Kling.
2965
2966         * dom/Attr.cpp:
2967         (WebCore::Attr::childrenChanged): StringBuilder can output AtomicString directly.
2968
2969 2013-02-05  Yusuf Ozuysal  <yusufo@google.com>
2970
2971         [chromium] Enable shouldGesturesTriggerActive for Android
2972         https://bugs.webkit.org/show_bug.cgi?id=96948
2973
2974         Reviewed by James Robinson.
2975
2976         We need this to fix performance issues we are getting because of touchstart 
2977         triggering hover/active states.
2978
2979         No new tests. The tests introduced in https://bugs.webkit.org/show_bug.cgi?id=96060
2980         should run with the corrected behavior and would cover this change as well.
2981
2982         * page/EventHandler.cpp:
2983         (WebCore::shouldGesturesTriggerActive):
2984
2985 2013-02-05  Mark Lam  <mark.lam@apple.com>
2986
2987         Introduced back-end database classes + a few small fixes.
2988         https://bugs.webkit.org/show_bug.cgi?id=108759.
2989
2990         Reviewed by Brady Eidson.
2991
2992         1. Added DatabaseBackendContext, DatabaseBackendAsync, and DatabaseBackendSync.
2993            These are backends for DatabaseContext, Database, and DatabaseSync
2994            respectively.
2995         2. Added DatabaseBase to hold common code between Database and DatabaseSync.
2996         3. Renamed a few functions.
2997         4. Cleaned up unneeded code in ~DatabaseSync().
2998         5. Added some FIXMEs as reminders or places to clean up when we're done
2999            refactoring.
3000         6. Moved the calling of ScriptController::initializeThreading() from the Database
3001            constructor to DatabaseManager::openDatabase(). This just moves the call
3002            earlier in the same code path. System initialization work (i.e. initializing
3003            script threading in this case) should be done by the manager instead of by
3004            each Database instance.
3005
3006         No new tests.
3007
3008         * CMakeLists.txt:
3009         * GNUmakefile.list.am:
3010         * Modules/webdatabase/AbstractDatabaseServer.h:
3011         (AbstractDatabaseServer):
3012         * Modules/webdatabase/Database.cpp:
3013         (WebCore::Database::Database):
3014         (WebCore::Database::backend):
3015         * Modules/webdatabase/Database.h:
3016         (Database):
3017         * Modules/webdatabase/DatabaseBackend.cpp:
3018         (WebCore::DatabaseBackend::DatabaseBackend):
3019         (WebCore::DatabaseBackend::~DatabaseBackend):
3020         (WebCore::DatabaseBackend::incrementalVacuumIfNeeded):
3021         * Modules/webdatabase/DatabaseBackend.h:
3022         (DatabaseBackend):
3023         (WebCore::DatabaseBackend::databaseContext):
3024         (WebCore::DatabaseBackend::setFrontend):
3025         * Modules/webdatabase/DatabaseBackendAsync.cpp: Added.
3026         (WebCore::DatabaseBackendAsync::DatabaseBackendAsync):
3027         * Modules/webdatabase/DatabaseBackendAsync.h: Added.
3028         (DatabaseBackendAsync):
3029         * Modules/webdatabase/DatabaseBackendContext.cpp: Added.
3030         (WebCore::DatabaseBackendContext::securityOrigin):
3031         (WebCore::DatabaseBackendContext::isContextThread):
3032         * Modules/webdatabase/DatabaseBackendContext.h: Added.
3033         (DatabaseBackendContext):
3034         (WebCore::DatabaseBackendContext::scriptExecutionContext):
3035         * Modules/webdatabase/DatabaseBackendSync.cpp: Added.
3036         (WebCore::DatabaseBackendSync::DatabaseBackendSync):
3037         (WebCore::DatabaseBackendSync::~DatabaseBackendSync):
3038         * Modules/webdatabase/DatabaseBackendSync.h: Added.
3039         (DatabaseBackendSync):
3040         * Modules/webdatabase/DatabaseBase.cpp: Added.
3041         (WebCore::DatabaseBase::DatabaseBase):
3042         (WebCore::DatabaseBase::scriptExecutionContext):
3043         (WebCore::DatabaseBase::logErrorMessage):
3044         * Modules/webdatabase/DatabaseBase.h: Added.
3045         (DatabaseBase):
3046         * Modules/webdatabase/DatabaseContext.cpp:
3047         (WebCore::DatabaseContext::DatabaseContext):
3048         (WebCore::DatabaseContext::backend):
3049         * Modules/webdatabase/DatabaseContext.h:
3050         (DatabaseContext):
3051         * Modules/webdatabase/DatabaseManager.cpp:
3052         (WebCore::DatabaseManager::openDatabase):
3053         (WebCore::DatabaseManager::openDatabaseSync):
3054         (WebCore::DatabaseManager::hasOpenDatabases):
3055         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
3056         (WebCore::DatabaseManager::getMaxSizeForDatabase):
3057         (WebCore::DatabaseManager::logErrorMessage):
3058         * Modules/webdatabase/DatabaseManager.h:
3059         (DatabaseManager):
3060         * Modules/webdatabase/DatabaseServer.cpp:
3061         (WebCore::DatabaseServer::interruptAllDatabasesForContext):
3062         (WebCore::DatabaseServer::canEstablishDatabase):
3063         * Modules/webdatabase/DatabaseServer.h:
3064         * Modules/webdatabase/DatabaseSync.cpp:
3065         (WebCore::DatabaseSync::DatabaseSync):
3066         (WebCore::DatabaseSync::~DatabaseSync):
3067         (WebCore::DatabaseSync::backend):
3068         * Modules/webdatabase/DatabaseSync.h:
3069         (DatabaseSync):
3070         * Modules/webdatabase/DatabaseTracker.cpp:
3071         (WebCore::DatabaseTracker::openTrackerDatabase):
3072         (WebCore::DatabaseTracker::canEstablishDatabase):
3073         (WebCore::DatabaseTracker::hasEntryForDatabase):
3074         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
3075         (WebCore::DatabaseTracker::populateOriginsIfNeeded):
3076         (WebCore::DatabaseTracker::databaseNamesForOriginNoLock):
3077         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
3078         (WebCore::DatabaseTracker::setDatabaseDetails):
3079         (WebCore::DatabaseTracker::usageForOriginNoLock):
3080         (WebCore::DatabaseTracker::setQuota):
3081         (WebCore::DatabaseTracker::addDatabase):
3082         (WebCore::DatabaseTracker::deleteOrigin):
3083         (WebCore::DatabaseTracker::isDeletingDatabaseOrOriginFor):
3084         (WebCore::DatabaseTracker::canDeleteDatabase):
3085         (WebCore::DatabaseTracker::isDeletingDatabase):
3086         (WebCore::DatabaseTracker::canDeleteOrigin):
3087         (WebCore::DatabaseTracker::isDeletingOrigin):
3088         (WebCore::DatabaseTracker::recordDeletingOrigin):
3089         (WebCore::DatabaseTracker::doneDeletingOrigin):
3090         (WebCore::DatabaseTracker::deleteDatabase):
3091         (WebCore::DatabaseTracker::deleteDatabaseFile):
3092         * Modules/webdatabase/DatabaseTracker.h:
3093         (DatabaseTracker):
3094         * Modules/webdatabase/SQLTransaction.cpp:
3095         * Modules/webdatabase/SQLTransactionClient.cpp:
3096         (WebCore::SQLTransactionClient::didExceedQuota):
3097         * Modules/webdatabase/SQLTransactionSync.cpp:
3098         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
3099         (WebCore::DatabaseTracker::canEstablishDatabase):
3100         (WebCore::DatabaseTracker::removeOpenDatabase):
3101         (WebCore::DatabaseTracker::prepareToOpenDatabase):
3102         (WebCore::DatabaseTracker::failedToOpenDatabase):
3103         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
3104         (WebCore::DatabaseTracker::closeDatabasesImmediately):
3105         * Modules/webdatabase/chromium/SQLTransactionClientChromium.cpp:
3106         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
3107         (WebCore::SQLTransactionClient::didExceedQuota):
3108         * Target.pri:
3109         * WebCore.gypi:
3110         * WebCore.vcproj/WebCore.vcproj:
3111         * WebCore.vcxproj/WebCore.vcxproj:
3112         * WebCore.vcxproj/WebCore.vcxproj.filters:
3113         * WebCore.xcodeproj/project.pbxproj:
3114
3115 2013-02-05  Nayan Kumar K  <nayankk@motorola.com>
3116
3117         [WEBGL] Rename WEBKIT_WEBGL_depth_texture to WEBGL_depth_texture.
3118         https://bugs.webkit.org/show_bug.cgi?id=108959
3119
3120         Reviewed by Kenneth Russell.
3121
3122         WEBGL_depth_texture is official now. Hence remove the vendor prefix from
3123         WEBKIT_WEBGL_depth_texture and rename this extension string to WEBGL_depth_texture.
3124         Specification: http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/.
3125
3126         Tests already exists, modified them to test querying of unprefixed extension string.
3127
3128         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3129         (WebCore::toJS):
3130         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3131         (WebCore::toV8Object):
3132         * html/canvas/WebGLDepthTexture.cpp:
3133         (WebCore::WebGLDepthTexture::getName):
3134         * html/canvas/WebGLExtension.h:
3135         * html/canvas/WebGLRenderingContext.cpp:
3136         (WebCore):
3137         (WebCore::WebGLRenderingContext::getExtension):
3138
3139 2013-02-05  Sheriff Bot  <webkit.review.bot@gmail.com>
3140
3141         Unreviewed, rolling out r141905.
3142         http://trac.webkit.org/changeset/141905
3143         https://bugs.webkit.org/show_bug.cgi?id=108963
3144
3145         "Broke mac build" (Requested by tonyg-cr on #webkit).
3146
3147         * html/parser/BackgroundHTMLParser.cpp:
3148         (WebCore::BackgroundHTMLParser::pumpTokenizer):
3149         * html/parser/CompactHTMLToken.cpp:
3150         (SameSizeAsCompactHTMLToken):
3151         (WebCore::isStringSafeToSendToAnotherThread):
3152         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread):
3153         * html/parser/CompactHTMLToken.h:
3154         (WebCore):
3155         (CompactHTMLToken):
3156         * html/parser/HTMLDocumentParser.cpp:
3157         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
3158         (WebCore::HTMLDocumentParser::pumpTokenizer):
3159         * html/parser/XSSAuditor.cpp:
3160         (WebCore::XSSAuditor::filterToken):
3161         * html/parser/XSSAuditor.h:
3162         (WebCore):
3163         (XSSAuditor):
3164         * html/parser/XSSAuditorDelegate.cpp:
3165         (WebCore::XSSAuditorDelegate::didBlockScript):
3166         * html/parser/XSSAuditorDelegate.h:
3167         (WebCore::DidBlockScriptRequest::create):
3168         (WebCore::DidBlockScriptRequest::DidBlockScriptRequest):
3169         (XSSAuditorDelegate):
3170         * platform/KURL.cpp:
3171         * platform/KURL.h:
3172         (KURL):
3173         * platform/KURLGoogle.cpp:
3174         (WebCore::KURLGooglePrivate::reportMemoryUsage):
3175         * platform/KURLGooglePrivate.h:
3176         (KURLGooglePrivate):
3177         * platform/KURLWTFURLImpl.h:
3178         (WebCore::KURLWTFURLImpl::reportMemoryUsage):
3179
3180 2013-02-05  Dominik Röttsches  <dominik.rottsches@intel.com>
3181
3182         [HarfBuzz][Cairo] harfBuzzGetGlyph is slow and hot
3183         https://bugs.webkit.org/show_bug.cgi?id=108941
3184
3185         Reviewed by Kenneth Rohde Christiansen.
3186
3187         The text to glyph conversion using Cairo is slow
3188         due to expensive text codec conversion to UTF-8.
3189         Additionally, the glyph lookup itself is expensive.
3190
3191         Inspired by the approach taken in HarfBuzzFaceSkia.cpp
3192         I suggest to implement a similar caching mechanism to
3193         accelerate this conversion.
3194
3195         Arabic line breaking test, under review in
3196         bug 108948 shows about 58% improvement on my system
3197         with this patch.
3198
3199         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
3200         (WebCore::HarfBuzzFontData::HarfBuzzFontData):
3201             New container structure that keeps pointers
3202             to the cairo scaled font as well as the glyph cache.
3203         (HarfBuzzFontData):
3204         (WebCore):
3205         (WebCore::harfBuzzGetGlyph): Using the new container structure for accessing the cache.
3206         (WebCore::harfBuzzGetGlyphHorizontalAdvance): Using the new container structure for accessing the scaled font.
3207         (WebCore::harfBuzzGetGlyphExtents): Ditto.
3208         (WebCore::destroyHarfBuzzFontData): Destroying the container that held the pointers.
3209         (WebCore::HarfBuzzFace::createFont):
3210             Initializing the container structure with the pointers
3211             to the cache that is held in HarfBuzzFace and the cairo scaled font.
3212
3213 2013-02-05  Tony Gentilcore  <tonyg@chromium.org>
3214
3215         Call XSSAuditor's didBlockScript() for the threaded HTML parser
3216         https://bugs.webkit.org/show_bug.cgi?id=108726
3217
3218         Reviewed by Adam Barth.
3219
3220         This patch causes us to call didBlockScript() on the main thread if the CompactHTML token has XSSInfo.
3221         To do so, we:
3222         1. Rename DidBlockScriptRequest to XSSInfo.
3223         2. Add an OwnPtr<XSSInfo> field to CompactHTMLToken.
3224         3. Add an isSafeToSendToAnotherThread() method to String and KURL.
3225
3226         We don't yet populate didBlockScriptRequest on the background thread, but this should just work once we do.
3227
3228         No new tests because no new functionality.
3229
3230         * html/parser/BackgroundHTMLParser.cpp:
3231         (WebCore::BackgroundHTMLParser::pumpTokenizer): Update comment for rename.
3232         * html/parser/CompactHTMLToken.cpp:
3233         (SameSizeAsCompactHTMLToken):
3234         (WebCore::CompactHTMLToken::CompactHTMLToken): Add a copy constructor used by Vector.
3235         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread): Include new m_xssInfo field in safety check.
3236         (WebCore):
3237         (WebCore::CompactHTMLToken::xssInfo): Added.
3238         (WebCore::CompactHTMLToken::setXSSInfo): Added.
3239         * html/parser/CompactHTMLToken.h: Add an OwnPtr<XSSInfo> field to CompactHTMLToken.
3240         (WebCore):
3241         (CompactHTMLToken):
3242         (WTF): Add VectorTraits necessary for copying Vector fields objects that contain an OwnPtr.
3243         * html/parser/HTMLDocumentParser.cpp:
3244         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser): Add new didBlockScript() call.
3245         (WebCore::HTMLDocumentParser::pumpTokenizer):
3246         * html/parser/XSSAuditor.cpp: Renaming.
3247         (WebCore::XSSAuditor::filterToken):
3248         * html/parser/XSSAuditor.h: Renaming.
3249         (WebCore):
3250         (XSSAuditor):
3251         * html/parser/XSSAuditorDelegate.cpp:
3252         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
3253         (WebCore):
3254         (WebCore::XSSAuditorDelegate::didBlockScript):
3255         * html/parser/XSSAuditorDelegate.h:
3256         (WebCore::XSSInfo::create):
3257         (XSSInfo):
3258         (WebCore::XSSInfo::XSSInfo):
3259         (XSSAuditorDelegate):
3260         * platform/KURL.cpp:
3261         (WebCore::KURL::isSafeToSendToAnotherThread): Added.
3262         (WebCore):
3263         * platform/KURL.h:
3264         (KURL):
3265         * platform/KURLGoogle.cpp:
3266         (WebCore):
3267         (WebCore::KURLGooglePrivate::isSafeToSendToAnotherThread): Added.
3268         * platform/KURLGooglePrivate.h:
3269         (KURLGooglePrivate):
3270         * platform/KURLWTFURLImpl.h:
3271         (WebCore::KURLWTFURLImpl::isSafeToSendToAnotherThread): Added.
3272
3273 2013-02-05  Anton Vayvod  <avayvod@chromium.org>
3274
3275         TextAutosizing: adjust the maximum difference between cluster text width and its descendant
3276         width.
3277         https://bugs.webkit.org/show_bug.cgi?id=108411
3278
3279         Currently, if a render object is more than 200 CSS units shorter than its parent cluster, it
3280         becomes a separate autosizing cluster (see https://bugs.webkit.org/show_bug.cgi?id=105188).
3281         This doesn't work well for layouts when narrow nodes are related, like nested comments:
3282         deeper comments are all shorter than the parent cluster and become autosized differently. To
3283         avoid that the difference that makes a shorter descendant a new autosizing cluster is
3284         adjusted each time the width difference is not greater than 50 CSS units from the previous
3285         one. This allows nested comments, for example, to remain a part of the parent cluster and be
3286         autosized with the same multiplier.
3287         
3288         Reviewed by Kenneth Rohde Christiansen.
3289
3290         Tests:
3291                 fast/text-autosizing/nested-child.html
3292
3293         * rendering/TextAutosizer.cpp:
3294         (WebCore::TextAutosizingClusterInfo::TextAutosizingClusterInfo):
3295
3296             Added a new field to store the current maximum width difference for the cluster.
3297
3298         (WebCore::TextAutosizer::isAutosizingCluster):
3299
3300             Uses the new field to determine if the current node is a separate cluster,
3301             updates the maximum allowed width difference between the cluster and its descendant.
3302
3303         (WebCore::TextAutosizer::processContainer):
3304         (WebCore::TextAutosizer::clusterShouldBeAutosized):
3305         (WebCore::TextAutosizer::measureDescendantTextWidth):
3306
3307             Non-const reference passed to the methods above.
3308
3309         * rendering/TextAutosizer.h: updated method parameters.
3310
3311 2013-02-05  Tony Gentilcore  <tonyg@chromium.org>
3312
3313         Continue making XSSAuditor thread safe: Remove dependency on parser's sourceForToken and TextResourceDecoder
3314         https://bugs.webkit.org/show_bug.cgi?id=108698
3315
3316         Reviewed by Adam Barth.
3317
3318         We'd like to be able to call filterToken() from the BackgroundHTMLParser where there is no HTMLDocumentParser. So we are removing the dependencies of
3319         filterToken() on the HTMLDocumentParser. This patch brings us one step closer to removing the m_parser member from XSSAuditor by passing in the
3320         TextResourceDecoder and HTMLSourceTracker to filterToken. To keep the number of parameters from blowing up, this introduces a FilterTokenRequest struct
3321         to hold its arguments. We expect to add one more member to this struct.
3322
3323
3324         No new tests because no new functionality.
3325
3326         * html/parser/HTMLDocumentParser.cpp:
3327         (WebCore::HTMLDocumentParser::pumpTokenizer):
3328         * html/parser/HTMLDocumentParser.h:
3329         * html/parser/XSSAuditor.cpp:
3330         (WebCore::XSSAuditor::filterToken):
3331         (WebCore::XSSAuditor::filterStartToken):
3332         (WebCore::XSSAuditor::filterCharacterToken):
3333         (WebCore::XSSAuditor::filterScriptToken):
3334         (WebCore::XSSAuditor::filterObjectToken):
3335         (WebCore::XSSAuditor::filterParamToken):
3336         (WebCore::XSSAuditor::filterEmbedToken):
3337         (WebCore::XSSAuditor::filterAppletToken):
3338         (WebCore::XSSAuditor::filterIframeToken):
3339         (WebCore::XSSAuditor::filterMetaToken):
3340         (WebCore::XSSAuditor::filterBaseToken):
3341         (WebCore::XSSAuditor::filterFormToken):
3342         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
3343         (WebCore::XSSAuditor::eraseAttributeIfInjected):
3344         (WebCore::XSSAuditor::decodedSnippetForName):
3345         (WebCore::XSSAuditor::decodedSnippetForAttribute):
3346         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
3347         * html/parser/XSSAuditor.h:
3348         (WebCore):
3349         (WebCore::FilterTokenRequest::FilterTokenRequest):
3350         (FilterTokenRequest):
3351         (XSSAuditor):
3352
3353 2013-02-05  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3354
3355         [Qt] REGRESSION(r137436): It made all inspector tests timeout on developer builds
3356         https://bugs.webkit.org/show_bug.cgi?id=106554
3357
3358         Reviewed by Simon Hausmann.
3359
3360         * Target.pri:
3361
3362 2013-02-05  Peter Rybin  <prybin@chromium.org>
3363
3364         Web Inspector: prevent crash, add required error string value
3365         https://bugs.webkit.org/show_bug.cgi?id=108776
3366
3367         Reviewed by Pavel Feldman.
3368
3369         Error string is assigned where missing, assert is added where empty string is
3370         possible.
3371
3372         * inspector/InjectedScriptBase.cpp:
3373         (WebCore::InjectedScriptBase::makeEvalCall):
3374         * inspector/PageRuntimeAgent.cpp:
3375         (WebCore::PageRuntimeAgent::injectedScriptForEval):
3376
3377 2013-02-05  Eugene Klyuchnikov  <eustas@chromium.org>
3378
3379         Web Inspector: Clicking a profile's title in the console loads about:blank.
3380         https://bugs.webkit.org/show_bug.cgi?id=107949
3381
3382         Reviewed by Vsevolod Vlasov.
3383
3384         Quick fix for regression.
3385
3386         * inspector/front-end/inspector.js:
3387         Avoid "exit route" when URL is a profile URL.
3388
3389 2013-02-05  Kent Tamura  <tkent@chromium.org>
3390
3391         INPUT_MULTIPLE_FIELDS_UI: element.focus() should not focus on disabled sub-fields.
3392         https://bugs.webkit.org/show_bug.cgi?id=108924
3393
3394         Reviewed by Kentaro Hara.
3395
3396         The first field may be non-focusable. We should search sub-fields for
3397         focusable one.
3398
3399         Test: fast/forms/date-multiple-fields/date-multiple-fields-focus.html
3400
3401         * html/shadow/DateTimeEditElement.cpp:
3402         (WebCore::DateTimeEditElement::focusOnNextFocusableField):
3403         Added. A private helper function.
3404         (WebCore::DateTimeEditElement::focusIfNoFocus): Use focusOnNextFocusableField.
3405         (WebCore::DateTimeEditElement::focusByOwner): Ditto.
3406         (WebCore::DateTimeEditElement::focusOnNextField): Ditto.
3407         * html/shadow/DateTimeEditElement.h:
3408         (DateTimeEditElement): Declare focusOnNextFocusableField.
3409
3410 2013-02-04  Vsevolod Vlasov  <vsevik@chromium.org>
3411
3412         Web Inspector: Create separate project for each file system added to inspector.
3413         https://bugs.webkit.org/show_bug.cgi?id=108652
3414
3415         Reviewed by Pavel Feldman.
3416
3417         Every file system added to web inspector is now represented by its own project in workspace.
3418         FileSystemMapping changed accrodingly.
3419
3420         Test: inspector/file-system-mapping.html
3421
3422         * inspector/front-end/FileMapping.js:
3423         (WebInspector.FileMapping.prototype._entryURIPrefix):
3424         * inspector/front-end/FileSystemMapping.js:
3425         (WebInspector.FileSystemMapping.prototype.fileForURI):
3426         (WebInspector.FileSystemMapping.prototype.uriForFile):
3427         (WebInspector.FileSystemMapping.prototype.uriPrefixForPathPrefix):
3428         (WebInspector.FileSystemMappingImpl):
3429         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings.get this):
3430         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings):
3431         (WebInspector.FileSystemMappingImpl.prototype._saveToSettings):
3432         (WebInspector.FileSystemMappingImpl.prototype.set _fileSystemName):
3433         (WebInspector.FileSystemMappingImpl.prototype.fileSystemId):
<