Reverting r142861. Hit testing inside of style recalc is fundamentally wrong
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-14  Simon Fraser  <simon.fraser@apple.com>
2
3         Reverting r142861. Hit testing inside of style recalc is fundamentally wrong
4
5         * page/EventHandler.cpp:
6         (WebCore::EventHandler::selectCursor):
7         (WebCore::EventHandler::handleMouseMoveEvent):
8         * page/EventHandler.h:
9         * rendering/RenderObject.cpp:
10         (WebCore::RenderObject::setStyle):
11         (WebCore::areNonIdenticalCursorListsEqual):
12         (WebCore::areCursorsEqual):
13         (WebCore::RenderObject::styleDidChange):
14
15 2013-02-14  Florin Malita  <fmalita@chromium.org>
16
17         [SVG] Cached filter results are not invalidated on repaint rect change
18         https://bugs.webkit.org/show_bug.cgi?id=106221
19
20         Reviewed by Dean Jackson.
21
22         Since the cached filter results are not invalidated for different repaint rects, we need
23         to render the content of the whole filter region upfront (otherwise elements not visible
24         during the initial paint due to scrolling/window size/etc. are never redrawn).
25
26         Tests: svg/filters/filter-hidden-content-expected.svg
27                svg/filters/filter-hidden-content.svg
28
29         * rendering/svg/RenderSVGResourceFilter.cpp:
30         (WebCore::RenderSVGResourceFilter::applyResource):
31         (WebCore::RenderSVGResourceFilter::drawingRegion):
32         (WebCore):
33         * rendering/svg/RenderSVGResourceFilter.h:
34         (FilterData):
35         (RenderSVGResourceFilter):
36         Track the filter drawing region in FilterData.
37
38         * rendering/svg/SVGRenderingContext.cpp:
39         (WebCore::SVGRenderingContext::~SVGRenderingContext):
40         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
41         * rendering/svg/SVGRenderingContext.h:
42         Update paintInfo.rect to cover the whole drawing region while rendering filter content, and
43         restore it when done.
44
45 2013-02-14  Jinwoo Song  <jinwoo7.song@samsung.com>
46
47         [EFL] Correct the mismatched cursor map
48         https://bugs.webkit.org/show_bug.cgi?id=109655
49
50         Reviewed by Laszlo Gombos.
51
52         Correct the mismatched ECORE_X_CURSOR values in the cursor map.
53
54         * platform/efl/EflScreenUtilities.cpp:
55         (WebCore::CursorMap::CursorMap):
56
57 2013-02-14  Kentaro Hara  <haraken@chromium.org>
58
59         Unreviewed. Rebaselined run-bindings-tests.
60
61         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
62         (WebDOMTestObj::anyAttribute):
63         (WebDOMTestObj::setAnyAttribute):
64         * bindings/scripts/test/CPP/WebDOMTestObj.h:
65         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
66         (webkit_dom_test_obj_get_any_attribute):
67         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
68         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
69         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
70         (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
71
72 2013-02-14  Christian Biesinger  <cbiesinger@chromium.org>
73
74         Convert media controls from DeprecatedFlexibleBox to FlexibleBox
75         https://bugs.webkit.org/show_bug.cgi?id=109775
76
77         Reviewed by Ojan Vafai.
78
79         Covered by existing tests in media/.
80
81         * css/mediaControls.css:
82         * css/mediaControlsBlackBerry.css:
83         * css/mediaControlsChromium.css:
84         * css/mediaControlsChromiumAndroid.css:
85         * css/mediaControlsEfl.css:
86         * css/mediaControlsGtk.css:
87         * css/mediaControlsQt.css:
88         * css/mediaControlsQuickTime.css:
89         Automated search and replace of old flexbox CSS rules to new ones.
90         Minor tuning of the chromium rules.
91
92         * rendering/RenderMediaControlElements.cpp:
93         (WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay):
94         (WebCore::RenderMediaControlTimeDisplay::layout):
95         * rendering/RenderMediaControlElements.h:
96         Make media controls inherit from RenderFlexibleBox
97
98 2013-02-14  Roger Fong  <roger_fong@apple.com>
99
100         Build fix for Windows.
101
102         * Modules/webdatabase/SQLTransactionStateMachine.cpp:
103         (WebCore::nameForSQLTransactionState):
104
105 2013-02-14  Dean Jackson  <dino@apple.com>
106
107         Inspector doesn't show rules from pluginsStyleSheet
108         https://bugs.webkit.org/show_bug.cgi?id=109872
109
110         Reviewed by Darin Adler.
111
112         Make sure getWrapperForRuleInSheets collects the rules
113         from CSSDefaultStyleSheets::plugInsStyleSheet.
114
115         Making a test for this is difficult because the rules in
116         this sheet only apply to snapshotted plugins at the moment,
117         which are disabled in DRT, and would require a fairly long
118         timeout in the test.
119
120         * css/InspectorCSSOMWrappers.cpp:
121         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
122
123 2013-02-14  Hayato Ito  <hayato@chromium.org>
124
125         Recover edge names used in MemoryInstrumentation for DocumentRuleSets.
126         https://bugs.webkit.org/show_bug.cgi?id=109800
127
128         Reviewed by Hajime Morita.
129
130         This is a following patch for r142573.
131         r142563 accidentally removes edge names for MemoryInstrumentation. We should recover edge names.
132
133         No tests. No change in behavior.
134
135         * css/DocumentRuleSets.cpp:
136         (WebCore::DocumentRuleSets::reportMemoryUsage):
137
138 2013-02-14  Hajime Morrita  <morrita@google.com>
139
140         [V8] Assertion failure on an exception is thrown
141         https://bugs.webkit.org/show_bug.cgi?id=109129
142
143         An assertion in V8AbstractEventListener is wrong. This change turns it into an error check.
144
145         Reviewed by Kentaro Hara.
146
147         Test: fast/events/onerror-no-constructor.html
148
149         * bindings/v8/V8AbstractEventListener.cpp:
150         (WebCore::V8AbstractEventListener::handleEvent):
151
152 2013-02-14  Kentaro Hara  <haraken@chromium.org>
153
154         [V8] CodeGeneratorV8.pm can assume that DOMWindow has [CheckSecurity]
155         https://bugs.webkit.org/show_bug.cgi?id=109788
156
157         Reviewed by Adam Barth.
158
159         There is code like this:
160
161           if ($extendedAttr{"CheckSecurity"} || $interfaceName eq "DOMWindow")
162
163         This check is redundant. DOMWindow has [CheckSecurity]. We can remove the
164         DOMWindow check.
165
166         No tests. No change in behavior.
167
168         * bindings/scripts/CodeGeneratorV8.pm:
169         (GenerateReplaceableAttrSetter):
170         (GenerateFunctionCallback):
171         (GenerateNonStandardFunction):
172         (GenerateImplementation):
173
174 2013-02-14  Joshua Bell  <jsbell@chromium.org>
175
176         [V8] IndexedDB: Remove unused creationContext paramter from idbKeyToV8Value
177         https://bugs.webkit.org/show_bug.cgi?id=109870
178
179         Reviewed by Kentaro Hara.
180
181         This parameter was left over from when the function was toV8(IDBKey). Remove it.
182
183         No new tests - just removing dead code.
184
185         * bindings/v8/IDBBindingUtilities.cpp:
186         (WebCore::idbKeyToV8Value): Remove unused parameter.
187         (WebCore::injectIDBKeyIntoScriptValue): No need for dummy handle.
188         (WebCore::idbKeyToScriptValue): No need for dummy handle.
189
190 2013-02-14  Kondapally Kalyan  <kalyan.kondapally@intel.com>
191
192         [WebGL][Qt] regression:r142786 Qt Build fix for Arm and Windows.
193         https://bugs.webkit.org/show_bug.cgi?id=109797
194
195         Reviewed by Csaba Osztrogon√°c.
196
197         After r142786, we use OpenGLShims to load necessary GL functions
198         exposed by ARB_vertex_array_object extension. Qt uses OpenGLShims
199         to load functions with GLES too. This patch adds support for loading the
200         equivalent functions on GLES exposed by OES_vertex_array_object.
201         
202         * platform/graphics/OpenGLShims.cpp:
203         (WebCore::initializeOpenGLShims):
204         * platform/graphics/OpenGLShims.h:
205
206 2013-02-14  Alexey Proskuryakov  <ap@apple.com>
207
208         <rdar://problem/13210723> CORS preflight broken with NetworkProcess
209         https://bugs.webkit.org/show_bug.cgi?id=109753
210
211         Reviewed by Brady Eidson.
212
213         * loader/DocumentThreadableLoader.h:
214         * loader/DocumentThreadableLoader.cpp:
215         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
216         (WebCore::DocumentThreadableLoader::cancel):
217         (WebCore::DocumentThreadableLoader::didReceiveResponse):
218         (WebCore::DocumentThreadableLoader::dataReceived):
219         (WebCore::DocumentThreadableLoader::didReceiveData):
220         (WebCore::DocumentThreadableLoader::notifyFinished):
221         (WebCore::DocumentThreadableLoader::didFinishLoading):
222         (WebCore::DocumentThreadableLoader::didFail):
223         (WebCore::DocumentThreadableLoader::preflightFailure): Notify InspectorInstrumentation
224         immediately. In addition to keeping up eith other changes, this means that an accurate
225         error will be passed now, not a cancellation.
226         (WebCore::DocumentThreadableLoader::loadRequest):
227         Get rid of m_preflightRequestIdentifier. Every loader has an identifier, and tracking
228         identifiers twice is wrong.
229         Pass identifier explicitly to more internal functions, so that they would not have to
230         second-guess callers.
231
232         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest):
233         Create an identifier for all loaders, not just those that we expect to have client
234         callbacks about. Both Inspector and NetworkProcess need identifiers everywhere.
235
236         * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::deprecatedDidReceiveCachedResource):
237         * loader/TextTrackLoader.h:
238         * loader/cache/CachedResourceClient.h:
239         (WebCore::CachedResourceClient::deprecatedDidReceiveCachedResource):
240         * loader/cache/CachedTextTrack.cpp: (WebCore::CachedTextTrack::data):
241         Renamed didReceiveData to avoid conflict with the new DocumentThreadableLoader::didReceiveData.
242         And we should really get rid of this CachedResourceClient function anyway.
243
244 2013-02-14  Kentaro Hara  <haraken@chromium.org>
245
246         Replace 'DOMObject' with 'any'
247         https://bugs.webkit.org/show_bug.cgi?id=109793
248
249         Reviewed by Dimitri Glazkov.
250
251         In the Web IDL spec, there is no type named 'DOMObject'.
252         It should be 'any'. We should replace all 'DOMObject's in WebKit IDLs with 'any's.
253
254         * Modules/webdatabase/SQLResultSetRowList.idl:
255         * bindings/scripts/CodeGeneratorCPP.pm:
256         (GetClassName):
257         (AddIncludesForType):
258         * bindings/scripts/CodeGeneratorGObject.pm:
259         (GenerateFunction):
260         * bindings/scripts/CodeGeneratorJS.pm:
261         (AddIncludesForType):
262         (GenerateImplementation):
263         (JSValueToNative):
264         (NativeToJSValue):
265         * bindings/scripts/CodeGeneratorV8.pm:
266         (GetNativeType):
267         (JSValueToNative):
268         (GetV8HeaderName):
269         * dom/CustomEvent.idl:
270         * dom/MessageEvent.idl:
271         * dom/PopStateEvent.idl:
272         * fileapi/FileReader.idl:
273         * html/HTMLCanvasElement.idl:
274         * html/HTMLElement.idl:
275         * html/canvas/DataView.idl:
276         * inspector/InjectedScriptHost.idl:
277         * inspector/InspectorFrontendHost.idl:
278         * inspector/JavaScriptCallFrame.idl:
279         * page/DOMWindow.idl:
280         * page/Location.idl:
281
282 2013-02-14  Kentaro Hara  <haraken@chromium.org>
283
284         [V8] Remove GenerateEventListenerCallback() from CodeGeneratorV8.pm
285         https://bugs.webkit.org/show_bug.cgi?id=109786
286
287         Reviewed by Adam Barth.
288
289         Some code is duplicated between GenerateEventListenerCallback()
290         and GenerateFunctionCallback(). By inlining GenerateEventListenerCallback()
291         into GenerateFunctionCallback(), we can remove the duplication.
292
293         No tests. No change in behavior.
294
295         * bindings/scripts/CodeGeneratorV8.pm:
296         (GenerateFunctionCallback):
297
298 2013-02-14  Ojan Vafai  <ojan@chromium.org>
299
300         Intrinsic and preferred widths on replaced elements are wrong in many cases
301         https://bugs.webkit.org/show_bug.cgi?id=109859
302
303         Reviewed by Levi Weintraub.
304
305         Test: fast/replaced/preferred-widths.html
306
307         * rendering/RenderReplaced.cpp:
308         (WebCore::RenderReplaced::computeIntrinsicLogicalWidths):
309         Separate out computing the intrinsic widths. Eventually,
310         we should be able to share computePreferredLogicalWidth implementations
311         for all replaced elements and form controls since only the intrinsic width
312         changes.
313
314         (WebCore::RenderReplaced::computePreferredLogicalWidths):
315         -Apply min-width and max-width constraints and then add borderAndPaddingLogicalWidth
316         at the end to make sure it's always applied. This matches all our other
317         computePreferredLogicalWidths override and makes use match Gecko's/Opera's rendering.
318         -Only set the minPreferredLogicalWidth to 0 if the width or max-width is a percent value.
319         Doing it for height values and for min-width doesn't make any sense and doesn't
320         match other browsers. Doing this for max-width still doesn't match other browsers,
321         but it sounds like Gecko at least would like to change that.
322
323         * rendering/RenderReplaced.h:
324         (WebCore::RenderReplaced::hasRelativeIntrinsicLogicalWidth):
325         * rendering/svg/RenderSVGRoot.cpp:
326         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
327         Add a way to check if the logicalWidth is relative so that we only check
328         the width in computePreferredLogicalWidths instead of also checking the height.
329
330         * rendering/svg/RenderSVGRoot.h:
331
332 2013-02-14  Stephen Chenney  <schenney@chromium.org>
333
334         Crash when selecting a HarfBuzz text run with SVG fonts included
335         https://bugs.webkit.org/show_bug.cgi?id=109833
336
337         Reviewed by Tony Chang.
338
339         There is an assert in SimpleFontData::applyTransforms that should not
340         be there, as the code is valid for SVG fonts. If we get past this,
341         then the HarfBuzz text run shaping code assumes that font data has a
342         SkTypeface member, and SVG fonts do not. So we crash there too.
343
344         For now, we fix the crashes. This still leaves incorrect selection
345         rectangles in this situation, on all platforms, tracked in
346         https://bugs.webkit.org/show_bug.cgi?id=108133
347
348         Test: svg/css/font-face-crash.html
349
350         * platform/graphics/SimpleFontData.h:
351         (WebCore::SimpleFontData::applyTransforms): Remove ASSERT_NOT_REACHED as the code can legally be reached for SVG fonts.
352         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
353         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Check for SVG fonts in the text run, and abort if we find them.
354
355 2013-02-13 Joe Mason <jmason@rim.com>
356
357         [BlackBerry] Notify platform layer of failing to get authentication credentials
358         https://bugs.webkit.org/show_bug.cgi?id=109751
359
360         Reviewed by Yong Li.
361         Reviewed internally by Leo Yang
362         Internal PR: 181302
363
364         The BlackBerry platform network layer needs to know if a stream failed to get authentication credentials.
365         This patch is using newly added stream API to do it.
366
367         No functionality changed no new tests.
368
369         * platform/network/blackberry/NetworkJob.cpp:
370         (WebCore::NetworkJob::notifyAuthReceived):
371         (WebCore::NetworkJob::sendRequestWithCredentials):
372         (WebCore::NetworkJob::notifyChallengeResult):
373         * platform/network/blackberry/NetworkJob.h:
374         * platform/network/blackberry/NetworkManager.cpp:
375         (WebCore::protectionSpaceToPlatformAuth):
376         (WebCore):
377         (WebCore::setAuthCredentials):
378         * platform/network/blackberry/NetworkManager.h:
379         (WebCore):
380
381 2013-02-14  Kondapally Kalyan  <kalyan.kondapally@intel.com>
382
383         [GTK] Fix indentation in GNUmakefile.list.am.
384         https://bugs.webkit.org/show_bug.cgi?id=109854
385
386         Reviewed by Martin Robinson.
387
388         This patch fixes indentation in GNUmakefile.list.am.
389
390         * GNUmakefile.list.am:
391
392 2013-02-14  Tony Chang  <tony@chromium.org>
393
394         Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files.
395         https://bugs.webkit.org/show_bug.cgi?id=96934
396
397         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
398         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
399
400 2013-02-14  Abhishek Arya  <inferno@chromium.org>
401
402         Bad cast in RenderBlock::splitBlocks.
403         https://bugs.webkit.org/show_bug.cgi?id=108691
404
405         Reviewed by Levi Weintraub.
406
407         Test: fast/multicol/remove-child-split-flow-crash.html
408
409         * rendering/RenderBlock.cpp:
410         (WebCore):
411         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): rename gIsInColumnFlowSplit to gColumnFlowSplitEnabled
412         and use it to decide when to do the column flow split or not.
413         (WebCore::RenderBlock::removeChild): Do not allow column flow split inside removeChild
414         since we might be merging anonymous blocks.
415
416 2013-02-14  Mark Lam  <mark.lam@apple.com>
417
418         Split SQLTransaction work between the frontend and backend.
419         https://bugs.webkit.org/show_bug.cgi?id=104750.
420
421         Reviewed by Sam Weinig.
422
423         This is part of the webdatabase refactoring for webkit2.
424
425         1. Changed how transactions are created.
426
427            - Database::runTransaction() first creates a SQLTransaction frontend
428              which encapsulates the 3 script callbacks. It then passes the
429              SQLTransaction to the backend database to create the
430              SQLTransactionBackend.
431            - The SQLTransactionBackend manages all SQLiteTransaction work.
432
433         2. Introduced SQLTransactionState and SQLTransactionStateMachine.
434
435            - Instead of tracking the transaction phases as "steps" in m_nextStep,
436              we now use m_nextState which is of enum class SQLTransactionState.
437              Unlike m_nextStep which is a pointer to a "step" function,
438              m_nextState is a state variable which is used to index into a
439              state dispatch table.
440
441            - Both SQLTransaction and SQLTransactionBackend now extends
442              SQLTransactionStateMachine, and uses its dispatch mechanism based on
443              the SQLTransactionState.
444
445            - Instead of having 1 state machine instances, there are 2: 1 in the
446              frontend, and 1 in the backend. The 2 have mirrored states, and
447              transfers work to the other state machine when needed.
448
449            - Previously, state functions can be called inline from other states.
450              They are now only called from the state machines runStateMachine()
451              method. This makes it possible to isolate the state transition
452              mechanism going between the sides (frontend and backend) to 2
453              functions only: SQLTransaction::sendToBackendState() and
454              SQLTransactionBackend::sendToFrontendState().
455
456         3. Consolidated cleanup work (mostly) to a unified cleanup function.
457
458         4. Changed the frontend Database::runTransaction() to use a
459            ChangeVersionData* (instead of a ChangeVersionWrapper ref ptr).
460
461            - This is necessary because ChangeVersionWrapper contains functionality
462              used in processing a transaction (to be invoked in the backend).
463              Instead, what we want is to simply pass the 2 old and new version
464              strings to the backend. The new ChangeVersionData simply packages up
465              these 2 strings.
466            - This makes ChangeVersionData easy to serialize for IPC messaging later.
467
468         5. Moved some transaction functions back to the frontend SQLTransaction
469            because they belong there.
470
471         6. Moved some Database functions to its DatabaseBackendAsync backend
472            now that the transaction has been split up.
473
474            - This is driven naturally by those functions being used exclusively
475              in the backend for transaction work.
476            - SQLTransactionClient, SQLTransactionCoordinator, and
477              SQLTransactionWrapper are now exclusively backend data structures.
478              SQLTransactionClient still has some frontend "pollution" that I'll
479              fix later.
480
481         7. Made the few database report functions used only by Chromium conditional
482            on PLATFORM(chromium).
483
484            - The report functions gets re-routed to Chromium's DatabaseObserver
485              which further routes them elsewhere. It is unclear how Chromium uses
486              these routed messages, and I am therefore not able to determine how
487              they should work in a frontend/backend world. So, I'm #ifdef'ing
488              them out. They still work like in the old way for Chromium.
489
490         8. Added new files to the build / project files.
491
492         9. Updated / added comments about how the transaction and its states work.
493
494         No new tests.
495
496         * CMakeLists.txt:
497         * GNUmakefile.list.am:
498         * Modules/webdatabase/AbstractDatabaseServer.h:
499         * Modules/webdatabase/ChangeVersionData.h: Added.
500         (ChangeVersionData):
501         (WebCore::ChangeVersionData::ChangeVersionData):
502         (WebCore::ChangeVersionData::oldVersion):
503         (WebCore::ChangeVersionData::newVersion):
504         * Modules/webdatabase/ChangeVersionWrapper.cpp:
505         (WebCore::ChangeVersionWrapper::performPreflight):
506         (WebCore::ChangeVersionWrapper::performPostflight):
507         (WebCore::ChangeVersionWrapper::handleCommitFailedAfterPostflight):
508         * Modules/webdatabase/ChangeVersionWrapper.h:
509         (ChangeVersionWrapper):
510         * Modules/webdatabase/Database.cpp:
511         (WebCore::Database::Database):
512         (WebCore::Database::close):
513         (WebCore::Database::changeVersion):
514         (WebCore::Database::transaction):
515         (WebCore::Database::readTransaction):
516         (WebCore::Database::runTransaction):
517         (WebCore::Database::reportStartTransactionResult):
518         (WebCore::Database::reportCommitTransactionResult):
519         (WebCore::Database::reportExecuteStatementResult):
520         * Modules/webdatabase/Database.h:
521         (WebCore::Database::databaseContext):
522         (Database):
523         (WebCore::Database::reportStartTransactionResult):
524         (WebCore::Database::reportCommitTransactionResult):
525         (WebCore::Database::reportExecuteStatementResult):
526         * Modules/webdatabase/DatabaseBackend.cpp:
527         * Modules/webdatabase/DatabaseBackend.h:
528         (DatabaseBackend):
529         (WebCore::DatabaseBackend::reportOpenDatabaseResult):
530         (WebCore::DatabaseBackend::reportChangeVersionResult):
531         (WebCore::DatabaseBackend::reportStartTransactionResult):
532         (WebCore::DatabaseBackend::reportCommitTransactionResult):
533         (WebCore::DatabaseBackend::reportExecuteStatementResult):
534         (WebCore::DatabaseBackend::reportVacuumDatabaseResult):
535         * Modules/webdatabase/DatabaseBackendAsync.cpp:
536         (WebCore::DatabaseBackendAsync::DatabaseBackendAsync):
537         (WebCore::DatabaseBackendAsync::runTransaction):
538         (WebCore::DatabaseBackendAsync::inProgressTransactionCompleted): Moved from frontend.
539         (WebCore::DatabaseBackendAsync::scheduleTransaction): Moved from frontend.
540         (WebCore::DatabaseBackendAsync::scheduleTransactionStep): Moved from frontend.
541         (WebCore::DatabaseBackendAsync::transactionClient): Moved from frontend.
542         (WebCore::DatabaseBackendAsync::transactionCoordinator): Moved from frontend.
543         * Modules/webdatabase/DatabaseBackendAsync.h:
544         (DatabaseBackendAsync):
545         * Modules/webdatabase/DatabaseBackendContext.cpp:
546         (WebCore::DatabaseBackendContext::frontend):
547         * Modules/webdatabase/DatabaseBackendContext.h:
548         (DatabaseBackendContext):
549         * Modules/webdatabase/DatabaseManager.cpp:
550         * Modules/webdatabase/DatabaseManager.h:
551         (DatabaseManager):
552         * Modules/webdatabase/DatabaseServer.cpp:
553         * Modules/webdatabase/DatabaseServer.h:
554         * Modules/webdatabase/DatabaseTask.cpp:
555         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask):
556         * Modules/webdatabase/SQLTransaction.cpp:
557         (WebCore::SQLTransaction::create):
558         (WebCore::SQLTransaction::SQLTransaction):
559         (WebCore::SQLTransaction::setBackend):
560         (WebCore::SQLTransaction::stateFunctionFor):
561         (WebCore::SQLTransaction::requestTransitToState):
562         (WebCore::SQLTransaction::nextStateForTransactionError):
563             - was handleTransactionError(). There's also a backend version.
564         (WebCore::SQLTransaction::deliverTransactionCallback): Moved from backend.
565         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Moved from backend.
566         (WebCore::SQLTransaction::deliverStatementCallback): Moved from backend.
567         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Moved from backend.
568         (WebCore::SQLTransaction::deliverSuccessCallback): Moved from backend.
569         (WebCore::SQLTransaction::unreachableState):
570         (WebCore::SQLTransaction::sendToBackendState):
571         (WebCore::SQLTransaction::performPendingCallback): Moved from backend.
572         (WebCore::SQLTransaction::executeSQL): Moved from backend.
573         (WebCore::SQLTransaction::checkAndHandleClosedOrInterruptedDatabase):
574         (WebCore::SQLTransaction::clearCallbackWrappers):
575         * Modules/webdatabase/SQLTransaction.h:
576         (SQLTransaction):
577         (WebCore::SQLTransaction::database):
578         (WebCore::SQLTransaction::hasCallback):
579         (WebCore::SQLTransaction::hasSuccessCallback):
580         (WebCore::SQLTransaction::hasErrorCallback):
581         * Modules/webdatabase/SQLTransactionBackend.cpp:
582         (WebCore::SQLTransactionBackend::create):
583         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
584         (WebCore::SQLTransactionBackend::doCleanup):
585         (WebCore::SQLTransactionBackend::transactionError):
586         (WebCore::SQLTransactionBackend::setShouldRetryCurrentStatement):
587         (WebCore::SQLTransactionBackend::stateFunctionFor):
588         (WebCore::SQLTransactionBackend::enqueueStatement):
589         (WebCore::SQLTransactionBackend::checkAndHandleClosedOrInterruptedDatabase):
590         (WebCore::SQLTransactionBackend::performNextStep):
591         (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
592         (WebCore::SQLTransactionBackend::acquireLock):
593         (WebCore::SQLTransactionBackend::lockAcquired):
594         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
595         (WebCore::SQLTransactionBackend::runStatements):
596         (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState):
597             - was runCurrentStatement().
598         (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError):
599             - was handleCurrentStatementError().
600         (WebCore::SQLTransactionBackend::postflightAndCommit):
601         (WebCore::SQLTransactionBackend::cleanupAndTerminate):
602         (WebCore::SQLTransactionBackend::nextStateForTransactionError):
603             - was handleTransactionError(). There's also a frontend version.
604         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
605         (WebCore::SQLTransactionBackend::requestTransitToState):
606         (WebCore::SQLTransactionBackend::unreachableState):
607         (WebCore::SQLTransactionBackend::sendToFrontendState):
608         * Modules/webdatabase/SQLTransactionBackend.h:
609         (SQLTransactionWrapper):
610         (SQLTransactionBackend):
611         (WebCore::SQLTransactionBackend::database):
612         * Modules/webdatabase/SQLTransactionClient.cpp:
613         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
614         (WebCore::SQLTransactionClient::didExecuteStatement):
615         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
616         (WebCore::getDatabaseIdentifier):
617         * Modules/webdatabase/SQLTransactionState.h: Added.
618         * Modules/webdatabase/SQLTransactionStateMachine.cpp: Added.
619         (WebCore::nameForSQLTransactionState):
620             - was debugStepName().
621         * Modules/webdatabase/SQLTransactionStateMachine.h: Added.
622         (SQLTransactionStateMachine):
623         (WebCore::SQLTransactionStateMachine::~SQLTransactionStateMachine):
624         (WebCore::::SQLTransactionStateMachine):
625         (WebCore::::setStateToRequestedState):
626         (WebCore::::runStateMachine):
627         * Target.pri:
628         * WebCore.gypi:
629         * WebCore.vcproj/WebCore.vcproj:
630         * WebCore.vcxproj/WebCore.vcxproj:
631         * WebCore.vcxproj/WebCore.vcxproj.filters:
632         * WebCore.xcodeproj/project.pbxproj:
633         * inspector/InspectorDatabaseAgent.cpp:
634
635 2013-02-14  Jer Noble  <jer.noble@apple.com>
636
637         EME: replace MediaKeySession.addKey() -> update()
638         https://bugs.webkit.org/show_bug.cgi?id=109461
639
640         Reviewed by Eric Carlson.
641
642         No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html test.
643
644         In the latest draft of the Encrypted Media Spec, the addKeys() method has been replaced
645         with update().
646
647         * Modules/encryptedmedia/CDM.h:
648         * Modules/encryptedmedia/MediaKeySession.cpp:
649         (WebCore::MediaKeySession::update):
650         (WebCore::MediaKeySession::addKeyTimerFired):
651         * Modules/encryptedmedia/MediaKeySession.h:
652         * Modules/encryptedmedia/MediaKeySession.idl:
653         * html/HTMLMediaElement.cpp:
654         (WebCore::HTMLMediaElement::webkitAddKey):
655         * testing/MockCDM.cpp:
656         (WebCore::MockCDMSession::update):
657
658 2013-02-14  Tony Chang  <tony@chromium.org>
659
660         Unreviewed, set svn:eol-style CRLF for .sln files.
661
662         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
663         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
664
665 2013-02-14  Eric Carlson  <eric.carlson@apple.com>
666
667         [Mac] adjust caption color user preference calculation
668         https://bugs.webkit.org/show_bug.cgi?id=109840
669
670         Reviewed by Dean Jackson.
671
672         No new tests, it isn't possible to test this with DRT.
673
674         * page/CaptionUserPreferencesMac.mm:
675         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): The color is "important" if either the
676             color or opacity are supposed to override.
677         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Ditto.
678         (WebCore::CaptionUserPreferencesMac::captionsTextColor): Ditto.
679
680         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
681         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
682
683 2013-02-14  Cosmin Truta  <ctruta@rim.com>
684
685         Numeric identifiers of events are not guaranteed to be unique
686         https://bugs.webkit.org/show_bug.cgi?id=103259
687
688         Reviewed by Alexey Proskuryakov.
689
690         The results of setTimeout, setInterval and navigator.geolocation.watchPosition
691         are positive integer values extracted from a simple circular sequential number
692         generator, whose uniqueness can be guaranteed for no more than 2^31 calls to
693         any of these functions. In order to provide this guarantee beyond this limit,
694         we repeatedly ask for the next sequential id until we get one that's not used
695         already.
696
697         This solution works instantly under normal circumstances, when there are few
698         live timeout ids or geolocation ids at any given moment. Handling millions of
699         live ids will require another solution.
700
701         No new tests. Brief tests of uniqueness already exist.
702         Moreover, reproducing this particular issue would require 2^31 set/clear
703         function calls, which is prohibitively expensive.
704
705         * Modules/geolocation/Geolocation.cpp:
706         (WebCore::Geolocation::Watchers::add): Rename from Watchers::set; return false if watch id already exists.
707         (WebCore::Geolocation::watchPosition): Repeat until the new watch id is unique.
708         * Modules/geolocation/Geolocation.h:
709         (Watchers): Rename Watchers::set to Watchers::add.
710         * Modules/geolocation/Geolocation.idl: Rename the argument of Geolocation::clearWatch to WatchID.
711         * dom/ScriptExecutionContext.cpp:
712         (WebCore::ScriptExecutionContext::ScriptExecutionContext): Update initialization.
713         (WebCore::ScriptExecutionContext::circularSequentialID): Rename from newUniqueID; remove FIXME note.
714         * dom/ScriptExecutionContext.h:
715         (ScriptExecutionContext): Rename ScriptExecutionContext::newUniqueID to ScriptExecutionContext::circularSequentialID.
716         (WebCore::ScriptExecutionContext::addTimeout): Return false (do not assert) if timeout id already exists.
717         * page/DOMTimer.cpp:
718         (WebCore::DOMTimer::DOMTimer): Repeat until the new timeout id is unique.
719
720 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
721
722         Unreviewed, rolling out r142825.
723         http://trac.webkit.org/changeset/142825
724         https://bugs.webkit.org/show_bug.cgi?id=109856
725
726         Causes some inspector tests to time out (Requested by anttik
727         on #webkit).
728
729         * platform/mac/SharedTimerMac.mm:
730         (WebCore):
731         (WebCore::PowerObserver::restartSharedTimer):
732         (WebCore::setSharedTimerFireInterval):
733         (WebCore::stopSharedTimer):
734
735 2013-02-14  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
736
737         Support the ch unit from css3-values
738         https://bugs.webkit.org/show_bug.cgi?id=85755
739
740         Reviewed by David Hyatt.
741
742         Original patch by Sumedha Widyadharma <sumedha.widyadharma@basyskom.com>.
743
744         Test: fast/css/css3-ch-unit.html
745
746         * css/CSSCalculationValue.cpp:
747         (WebCore::unitCategory):
748         * css/CSSGrammar.y.in:
749         * css/CSSParser.cpp:
750         (WebCore::CSSParser::validUnit):
751         (WebCore::CSSParser::createPrimitiveNumericValue):
752         (WebCore::CSSParser::parseValidPrimitive):
753         (WebCore::CSSParser::detectNumberToken):
754         * css/CSSParserValues.cpp:
755         (WebCore::CSSParserValue::createCSSValue):
756         * css/CSSPrimitiveValue.cpp:
757         (WebCore::isValidCSSUnitTypeForDoubleConversion):
758         (WebCore::CSSPrimitiveValue::cleanup):
759         (WebCore::CSSPrimitiveValue::computeLengthDouble):
760         (WebCore::CSSPrimitiveValue::customCssText):
761         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
762         * css/CSSPrimitiveValue.h:
763         (WebCore::CSSPrimitiveValue::isFontRelativeLength):
764         (WebCore::CSSPrimitiveValue::isLength):
765         * platform/graphics/FontMetrics.h:
766         (WebCore::FontMetrics::FontMetrics):
767         (WebCore::FontMetrics::zeroWidth):
768         (WebCore::FontMetrics::setZeroWidth):
769         (FontMetrics):
770         (WebCore::FontMetrics::hasZeroWidth):
771         (WebCore::FontMetrics::setHasZeroWidth):
772         * platform/graphics/SimpleFontData.cpp:
773         (WebCore::SimpleFontData::platformGlyphInit):
774         * platform/graphics/SimpleFontData.h:
775         (WebCore::SimpleFontData::zeroGlyph):
776         (WebCore::SimpleFontData::setZeroGlyph):
777         (SimpleFontData):
778         * platform/graphics/qt/SimpleFontDataQt.cpp:
779         (WebCore::SimpleFontData::platformInit):
780
781 2013-02-14  David Kilzer  <ddkilzer@apple.com>
782
783         [Mac] Clean up WARNING_CFLAGS
784         <http://webkit.org/b/109747>
785         <rdar://problem/13208373>
786
787         Reviewed by Mark Rowe.
788
789         * Configurations/Base.xcconfig: Use
790         GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
791         -Wshorten-64-to-32 rather than WARNING_CFLAGS.
792
793 2013-02-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
794
795         Add addHTTPHeaderField() method to ResourceResponse
796         https://bugs.webkit.org/show_bug.cgi?id=109844
797
798         Reviewed by Adam Barth.
799
800         ResourceRequestBase provides both setHTTPHeaderField() and addHTTPHeaderField(). However,
801         ResourceResponseBase only provides setHTTPHeaderField(). This is a bit inconsistent. As a
802         result, the addHTTPHeaderField() functionality's implementation is duplicated in several
803         ports (at least chromium and soup).
804
805         This patch introduces addHTTPHeaderField() to ResourceResponseBase and makes use of it
806         in Chromium and Soup backends.
807
808         No new tests, no behavior change.
809
810         * platform/chromium/support/WebURLResponse.cpp:
811         (WebKit::WebURLResponse::addHTTPHeaderField): Use ResourceResponseBase::addHTTPHeaderField().
812         * platform/network/ResourceResponseBase.cpp:
813         (WebCore::ResourceResponseBase::updateHeaderParsedState): Move headers' parsed state update code
814         from setHTTPHeaderField() to a new updateHeaderParsedState() method to avoid code duplication.
815         (WebCore):
816         (WebCore::ResourceResponseBase::setHTTPHeaderField):
817         (WebCore::ResourceResponseBase::addHTTPHeaderField):
818         * platform/network/ResourceResponseBase.h:
819         (ResourceResponseBase):
820         * platform/network/soup/ResourceResponseSoup.cpp:
821         (WebCore::ResourceResponse::updateFromSoupMessageHeaders): Use ResourceResponseBase::addHTTPHeaderField().
822
823 2013-02-14  Philip Rogers  <pdr@google.com>
824
825         Prevent inconsistent firstChild during document destruction
826         https://bugs.webkit.org/show_bug.cgi?id=106530
827
828         Reviewed by Abhishek Arya.
829
830         During document destruction, addChildNodesToDeletionQueue can allow a container
831         node to have an invalid first child, causing a crash. This patch updates
832         addChildNodesToDeletionQueue to maintain a valid value for firstChild() even
833         while updating its children.
834
835         Test: svg/custom/animateMotion-path-change-crash.svg
836
837         * dom/ContainerNodeAlgorithms.h:
838         (WebCore::Private::addChildNodesToDeletionQueue):
839             To ensure prevoiusSibling() is also valid, this code was slightly refactored
840             to call setPreviousSibling(0) on the next node instead of the current node.
841
842 2013-02-14  Julien Chaffraix  <jchaffraix@webkit.org>
843
844         [CSS Grid Layout] Add an internal 2D grid representation to RenderGrid
845         https://bugs.webkit.org/show_bug.cgi?id=109714
846
847         Reviewed by Ojan Vafai.
848
849         This change introduces a 2D grid representation of the grid areas. Our implementation
850         is a straight Vector of Vectors for the grid areas, each grid area able to hold an
851         arbitrary number of RenderBox* so they hold a Vector of RenderBoxes. As an optimization,
852         each grid area has enough inline storage to hold one grid item which should cover
853         most cases.
854
855         In order to keep the code readable, a GridIterator was introduced to hide the new grid.
856
857         Refactoring, covered by existing tests.
858
859         * rendering/RenderGrid.cpp:
860         (RenderGrid::GridIterator):
861         (WebCore::RenderGrid::GridIterator::GridIterator):
862         (WebCore::RenderGrid::GridIterator::nextGridItem):
863         Added a mono-directional iterator. In order to be more aligned with the rest of the code,
864         this iterator actually walks orthogonally to the |direction| (ie fixing the |direction|'s track).
865
866         * rendering/RenderGrid.cpp:
867         (WebCore::RenderGrid::computePreferredLogicalWidths):
868         (WebCore::RenderGrid::layoutGridItems):
869         Updated these 2 functions to place the items on the grid and clear it at the end.
870
871         (WebCore::RenderGrid::computePreferredTrackWidth):
872         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
873         Updated to use the GridIterator to walk over the rows / columns.
874
875         (WebCore::RenderGrid::placeItemsOnGrid):
876         Added this function that inserts the grid items into the right grid area.
877
878         * rendering/RenderGrid.h:
879         (WebCore::RenderGrid::gridColumnCount):
880         (WebCore::RenderGrid::gridRowCount):
881         Added these helper functions.
882
883 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
884
885         Unreviewed, rolling out r141990.
886         http://trac.webkit.org/changeset/141990
887         https://bugs.webkit.org/show_bug.cgi?id=109850
888
889         ~5% regression on intl2 page cycler (Requested by kling on
890         #webkit).
891
892         * platform/graphics/GlyphPage.h:
893         (WebCore::GlyphPage::create):
894         (WebCore::GlyphPage::glyphDataForCharacter):
895         (WebCore::GlyphPage::glyphDataForIndex):
896         (WebCore::GlyphPage::fontDataForCharacter):
897         (WebCore::GlyphPage::setGlyphDataForIndex):
898         (GlyphPage):
899         (WebCore::GlyphPage::copyFrom):
900         (WebCore::GlyphPage::clear):
901         (WebCore::GlyphPage::clearForFontData):
902         (WebCore::GlyphPage::GlyphPage):
903         * platform/graphics/GlyphPageTreeNode.cpp:
904         (WebCore::GlyphPageTreeNode::initializePage):
905         * rendering/svg/SVGTextRunRenderingContext.cpp:
906         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
907
908 2013-02-14  Mark Pilgrim  <pilgrim@chromium.org>
909
910         [Chromium] Move PlatformMessagePortChannel to WebCore
911         https://bugs.webkit.org/show_bug.cgi?id=109845
912
913         Reviewed by Adam Barth.
914
915         Part of a larger refactoring series; see tracking bug 106829.
916
917         * WebCore.gyp/WebCore.gyp:
918         * WebCore.gypi:
919         * dom/default/chromium: Added.
920         * dom/default/chromium/PlatformMessagePortChannelChromium.cpp: Added.
921         (WebCore):
922         (WebCore::MessagePortChannel::create):
923         (WebCore::MessagePortChannel::createChannel):
924         (WebCore::MessagePortChannel::MessagePortChannel):
925         (WebCore::MessagePortChannel::~MessagePortChannel):
926         (WebCore::MessagePortChannel::entangleIfOpen):
927         (WebCore::MessagePortChannel::disentangle):
928         (WebCore::MessagePortChannel::postMessageToRemote):
929         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
930         (WebCore::MessagePortChannel::close):
931         (WebCore::MessagePortChannel::isConnectedTo):
932         (WebCore::MessagePortChannel::hasPendingActivity):
933         (WebCore::MessagePortChannel::locallyEntangledPort):
934         (WebCore::PlatformMessagePortChannel::create):
935         (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
936         (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel):
937         (WebCore::PlatformMessagePortChannel::createChannel):
938         (WebCore::PlatformMessagePortChannel::messageAvailable):
939         (WebCore::PlatformMessagePortChannel::entangleIfOpen):
940         (WebCore::PlatformMessagePortChannel::disentangle):
941         (WebCore::PlatformMessagePortChannel::postMessageToRemote):
942         (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
943         (WebCore::PlatformMessagePortChannel::close):
944         (WebCore::PlatformMessagePortChannel::isConnectedTo):
945         (WebCore::PlatformMessagePortChannel::hasPendingActivity):
946         (WebCore::PlatformMessagePortChannel::setEntangledChannel):
947         (WebCore::PlatformMessagePortChannel::webChannelRelease):
948         * dom/default/chromium/PlatformMessagePortChannelChromium.h: Added.
949         (WebKit):
950         (WebCore):
951         (PlatformMessagePortChannel):
952
953 2013-02-14  Chris Fleizach  <cfleizach@apple.com>
954
955         Remove Leopard Accessibility support from WebCore (now that no port builds on Leopard)
956         https://bugs.webkit.org/show_bug.cgi?id=90250
957
958         Reviewed by Eric Seidel.
959
960         The Leopard era checks for accessibility lists and accessibility tables can be removed now.
961
962         * accessibility/AccessibilityARIAGrid.cpp:
963         (WebCore):
964         * accessibility/AccessibilityARIAGrid.h:
965         (AccessibilityARIAGrid):
966         (WebCore::AccessibilityARIAGrid::isTableExposableThroughAccessibility):
967         * accessibility/AccessibilityList.cpp:
968         (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
969         * accessibility/AccessibilityList.h:
970         * accessibility/AccessibilityTable.cpp:
971         (WebCore::AccessibilityTable::AccessibilityTable):
972         (WebCore::AccessibilityTable::init):
973         * accessibility/AccessibilityTable.h:
974         (AccessibilityTable):
975         * accessibility/mac/AXObjectCacheMac.mm:
976         (WebCore::AXObjectCache::postPlatformNotification):
977         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
978         (createAccessibilityRoleMap):
979
980 2013-02-14  Bear Travis  <betravis@adobe.com>
981
982         Make outside-shape the default value for shape-inside
983         https://bugs.webkit.org/show_bug.cgi?id=109605
984
985         Reviewed by Levi Weintraub.
986
987         Creating a single reference outside-shape value and setting it as the default
988         for shape-inside.
989
990         Existing tests cover the default value, just updating them to use outside-shape.
991
992         * rendering/style/RenderStyle.cpp:
993         (WebCore::RenderStyle::initialShapeInside): Define a local static outside-shape
994         value.
995         (WebCore):
996         * rendering/style/RenderStyle.h: Move the initialShapeInside method to the .cpp
997         file.
998
999 2013-02-14  Min Qin  <qinmin@chromium.org>
1000
1001         Passing alpha to DeferredImageDecoder once decoding completes
1002         https://bugs.webkit.org/show_bug.cgi?id=108892
1003
1004         Reviewed by Stephen White.
1005
1006         We should pass hasAlpha value back to the DeferredImageDecoder once decoding is completed
1007         Added unit tests in ImageFrameGeneratorTest.
1008
1009         * platform/graphics/chromium/DeferredImageDecoder.cpp:
1010         (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex):
1011         * platform/graphics/chromium/ImageFrameGenerator.cpp:
1012         (WebCore::ImageFrameGenerator::tryToScale):
1013         (WebCore::ImageFrameGenerator::decode):
1014         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1015         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1016         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
1017         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1018         (WebCore::LazyDecodingPixelRef::hasAlpha):
1019         (LazyDecodingPixelRef):
1020         * platform/graphics/chromium/ScaledImageFragment.cpp:
1021         (WebCore::ScaledImageFragment::ScaledImageFragment):
1022         * platform/graphics/chromium/ScaledImageFragment.h:
1023         (WebCore::ScaledImageFragment::create):
1024         (ScaledImageFragment):
1025         (WebCore::ScaledImageFragment::hasAlpha):
1026
1027 2013-02-14  David Grogan  <dgrogan@chromium.org>
1028
1029         IndexedDB: Add a few more histogram calls
1030         https://bugs.webkit.org/show_bug.cgi?id=109762
1031
1032         Reviewed by Tony Chang.
1033
1034         A few places where commits could fail weren't being logged.
1035
1036         * Modules/indexeddb/IDBBackingStore.cpp:
1037         (WebCore::IDBBackingStore::deleteDatabase):
1038         (WebCore::IDBBackingStore::Transaction::commit):
1039
1040 2013-02-14  Tony Chang  <tony@chromium.org>
1041
1042         Padding and border changes doesn't trigger relayout of children
1043         https://bugs.webkit.org/show_bug.cgi?id=109639
1044
1045         Reviewed by Kent Tamura.
1046
1047         In RenderBlock::layoutBlock, we only relayout our children if our logical width
1048         changes. This misses cases where our logical width doesn't change (i.e., padding
1049         or border changes), but our content width does change.
1050
1051         This is a more general case of bug 104997.
1052
1053         Test: fast/block/dynamic-padding-border.html
1054
1055         * rendering/RenderBox.cpp:
1056         (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed.
1057         (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen
1058         even without border-box box sizing.
1059
1060 2013-02-14  Peter Rybin  <prybin@chromium.org>
1061
1062         Web Inspector: fix closure compilation warnings caused by setVariableValue change
1063         https://bugs.webkit.org/show_bug.cgi?id=109488
1064
1065         Reviewed by Pavel Feldman.
1066
1067         Annotations are fixed as required by closure compiler.
1068         Parameters in Inspector.json are reordered as required.
1069
1070         * inspector/InjectedScriptExterns.js:
1071         (InjectedScriptHost.prototype.setFunctionVariableValue):
1072         (JavaScriptCallFrame.prototype.setVariableValue):
1073         * inspector/InjectedScriptSource.js:
1074         (.):
1075         * inspector/Inspector.json:
1076         * inspector/InspectorDebuggerAgent.cpp:
1077         (WebCore::InspectorDebuggerAgent::setVariableValue):
1078         * inspector/InspectorDebuggerAgent.h:
1079         (InspectorDebuggerAgent):
1080
1081 2013-02-14  Tommy Widenflycht  <tommyw@google.com>
1082
1083         MediaStream API: RTCDataChannel triggers a use-after-free
1084         https://bugs.webkit.org/show_bug.cgi?id=109806
1085
1086         Reviewed by Adam Barth.
1087
1088         Making sure RTCPeerConnection::stop() is always called at least once.
1089         Also making sure that RTCDataChannels state gets set to Closed correctly.
1090
1091         Hard to test in WebKit but covered by Chromium tests.
1092
1093         * Modules/mediastream/RTCDataChannel.cpp:
1094         (WebCore::RTCDataChannel::stop):
1095         * Modules/mediastream/RTCPeerConnection.cpp:
1096         (WebCore::RTCPeerConnection::~RTCPeerConnection):
1097         (WebCore::RTCPeerConnection::stop):
1098
1099 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
1100
1101         Web Inspector: [Regression] When several consecutive characters are typed each of them is marked as undoable state.
1102         https://bugs.webkit.org/show_bug.cgi?id=109823
1103
1104         Reviewed by Pavel Feldman.
1105
1106         * inspector/front-end/TextEditorModel.js:
1107         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1108
1109 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1110
1111         Unreviewed, rolling out r142820.
1112         http://trac.webkit.org/changeset/142820
1113         https://bugs.webkit.org/show_bug.cgi?id=109839
1114
1115         Causing crashes on chromium canaries (Requested by atwilson_
1116         on #webkit).
1117
1118         * dom/Document.cpp:
1119         (WebCore::Document::updateLayout):
1120         (WebCore::Document::implicitClose):
1121         * rendering/RenderQuote.h:
1122         (RenderQuote):
1123         * rendering/RenderView.cpp:
1124         * rendering/RenderView.h:
1125
1126 2013-02-14  Mario Sanchez Prada  <mario.prada@samsung.com>
1127
1128         [GTK] Missing call to g_object_ref while retrieving accessible table cells
1129         https://bugs.webkit.org/show_bug.cgi?id=106903
1130
1131         Reviewed by Martin Robinson.
1132
1133         Add missing extra ref to implementation of atk_table_ref_at().
1134
1135         Test: accessibility/table-cell-for-column-and-row-crash.html
1136
1137         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1138         (webkitAccessibleTableRefAt): This method transfers full ownership
1139         over the returned AtkObject, so an extra reference is needed here.
1140
1141 2013-02-14  Mike Fenton  <mifenton@rim.com>
1142
1143         [BlackBerry] Update keyboard event details to match platform details.
1144         https://bugs.webkit.org/show_bug.cgi?id=109693
1145
1146         Reviewed by Yong Li.
1147
1148         PR 220170.
1149
1150         Update the keyboard event details to match the
1151         platform details available.
1152
1153         Rename helper function to better describe the conversion.
1154
1155         Reviewed Internally by Nima Ghanavatian and Gen Mak.
1156
1157         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
1158         (WebCore::windowsKeyCodeForBlackBerryKeycode):
1159         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1160
1161 2013-02-08  Andrey Kosyakov  <caseq@chromium.org>
1162
1163         Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent
1164         https://bugs.webkit.org/show_bug.cgi?id=109192
1165
1166         Reviewed by Pavel Feldman.
1167
1168         - remove frame and compositing instrumentation methods from InspectorInstrumentation;
1169         - expose those methods on InspectorController instead.
1170
1171         * WebCore.exp.in:
1172         * inspector/InspectorController.cpp:
1173         (WebCore::InspectorController::didBeginFrame):
1174         (WebCore):
1175         (WebCore::InspectorController::didCancelFrame):
1176         (WebCore::InspectorController::willComposite):
1177         (WebCore::InspectorController::didComposite):
1178         * inspector/InspectorController.h:
1179         (InspectorController):
1180         * inspector/InspectorInstrumentation.cpp:
1181         (WebCore):
1182         * inspector/InspectorInstrumentation.h:
1183         (InspectorInstrumentation):
1184         * testing/Internals.cpp:
1185         (WebCore::Internals::emitInspectorDidBeginFrame):
1186         (WebCore::Internals::emitInspectorDidCancelFrame):
1187
1188 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1189
1190         Web Inspector: Fixed a layout regression in CanvasProfileView.
1191         https://bugs.webkit.org/show_bug.cgi?id=109835
1192
1193         Reviewed by Pavel Feldman.
1194
1195         Changed splitView.css to supported nested SplitView instances.
1196
1197         * inspector/front-end/splitView.css:
1198         (.split-view-vertical > .split-view-contents):
1199         (.split-view-vertical > .split-view-contents-first):
1200         (.split-view-vertical > .split-view-contents-first.maximized):
1201         (.split-view-vertical > .split-view-contents-second):
1202         (.split-view-vertical > .split-view-contents-second.maximized):
1203         (.split-view-horizontal > .split-view-contents):
1204         (.split-view-horizontal > .split-view-contents-first):
1205         (.split-view-horizontal > .split-view-contents-first.maximized):
1206         (.split-view-horizontal > .split-view-contents-second):
1207         (.split-view-horizontal > .split-view-contents-second.maximized):
1208         (.split-view-vertical > .split-view-sidebar.split-view-contents-first:not(.maximized)):
1209         (.split-view-vertical > .split-view-sidebar.split-view-contents-second:not(.maximized)):
1210         (.split-view-horizontal > .split-view-sidebar.split-view-contents-first:not(.maximized)):
1211         (.split-view-horizontal > .split-view-sidebar.split-view-contents-second:not(.maximized)):
1212         (.split-view-vertical > .split-view-resizer):
1213         (.split-view-horizontal > .split-view-resizer):
1214
1215 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1216
1217         Web Inspector: Color picker should not be available in Computed Styles pane.
1218         https://bugs.webkit.org/show_bug.cgi?id=109697
1219
1220         Reviewed by Alexander Pavlov.
1221
1222         Changed the parentPane parameter of WebInspector.ComputedStylePropertiesSection to the correct value
1223         (the ComputedStyleSidebarPane instance).
1224
1225         * inspector/front-end/StylesSidebarPane.js:
1226         (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
1227
1228 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
1229
1230         Web Inspector: don't create static local string for program literal in InspectorTimelineAgent
1231         https://bugs.webkit.org/show_bug.cgi?id=109811
1232
1233         Reviewed by Pavel Feldman.
1234
1235         Use const char* constant value instead of creating String from it in thread-unsafe
1236         static local variable.
1237
1238         * inspector/InspectorTimelineAgent.cpp:
1239         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1240
1241 2013-02-14  Pan Deng  <pan.deng@intel.com>
1242
1243         [Web Inspector] Fix initiator name issue in reload scenario for Network Panel.
1244         https://bugs.webkit.org/show_bug.cgi?id=108746.
1245
1246         Reviewed by Vsevolod Vlasov.
1247
1248         WebInspector.displayNameForURL() does not work as expected in the reload scenario,
1249         for example, "http://www.yahoo.com/" was trimed to "/" at one time, but at another,
1250         the full host name will be displayed.
1251         This fix return host + "/" in the issue scenario, and keep with get displayName() in ParsedURL.
1252
1253         No new tests.
1254
1255         * inspector/front-end/ParsedURL.js:
1256         (WebInspector.ParsedURL.prototype.get displayName): append "/" in the display host scenario.
1257         * inspector/front-end/ResourceUtils.js:
1258         (WebInspector.displayNameForURL): add host in the head if url trimed as a "/".
1259
1260 2013-02-14  Alexei Filippov  <alph@chromium.org>
1261
1262         Web Inspector: fix to record button remaining red after heap snapshot is taken
1263         https://bugs.webkit.org/show_bug.cgi?id=109804
1264
1265         Reviewed by Yury Semikhatsky.
1266
1267         Revert part of r142243 fix. Namely heap snapshot taking button made
1268         stateless as it was before.
1269
1270         * inspector/front-end/HeapSnapshotView.js:
1271         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
1272         * inspector/front-end/ProfilesPanel.js:
1273         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
1274
1275 2013-02-14  Alexander Pavlov  <apavlov@chromium.org>
1276
1277         Web Inspector: Consistently use SecurityOrigin::toRawString() for serialization across the backend code
1278         https://bugs.webkit.org/show_bug.cgi?id=109801
1279
1280         Reviewed by Yury Semikhatsky.
1281
1282         No new tests, as existing tests cover the change.
1283
1284         * inspector/InspectorAgent.cpp:
1285         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
1286         * inspector/InspectorIndexedDBAgent.cpp:
1287         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
1288         * inspector/InspectorPageAgent.cpp:
1289         (WebCore::InspectorPageAgent::buildObjectForFrame):
1290         * inspector/PageRuntimeAgent.cpp:
1291         (WebCore::PageRuntimeAgent::notifyContextCreated):
1292
1293 2013-02-14  Sergio Villar Senin  <svillar@igalia.com>
1294
1295         Add logging support to IndexedDB for non-Chromium platforms
1296         https://bugs.webkit.org/show_bug.cgi?id=109809
1297
1298         Reviewed by Kentaro Hara.
1299
1300         Enable logging of IndexedDB through the StorageAPI log channel for
1301         non-Chromium architectures.
1302
1303         No new tests required, we're just enabling logging for IndexedDB
1304         using the currently available logging framework.
1305
1306         * Modules/indexeddb/IDBTracing.h:
1307
1308 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
1309
1310         Web Inspector: Remove uriForFile and fileForURI methods from FileSystemMapping.
1311         https://bugs.webkit.org/show_bug.cgi?id=109704
1312
1313         Reviewed by Alexander Pavlov.
1314
1315         Replaced this methods with one line implementation on the only call site.
1316
1317         * inspector/front-end/FileSystemMapping.js:
1318         * inspector/front-end/FileSystemProjectDelegate.js:
1319         (WebInspector.FileSystemProjectDelegate.prototype._filePathForURI):
1320         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
1321         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
1322         (WebInspector.FileSystemProjectDelegate.prototype._populate):
1323
1324 2013-02-14  Anton Vayvod  <avayvod@chromium.org>
1325
1326         [Text Autosizing] Process narrow descendants with the same multiplier for the font size.
1327         https://bugs.webkit.org/show_bug.cgi?id=109573
1328
1329         Reviewed by Julien Chaffraix.
1330
1331         Combine narrow descendants of the same autosizing cluster into a group that is autosized
1332         with the same multiplier.
1333
1334         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
1335         a large margin individually applied (via a CSS selector), causing them all to individually
1336         appear narrower than their enclosing blockContainingAllText. Rather than making each of
1337         these paragraphs into a separate cluster, we want them all to share the same multiplier, as
1338         if they were a single cluster.
1339
1340         Test: fast/text-autosizing/narrow-descendants-combined.html
1341
1342         * rendering/TextAutosizer.cpp:
1343         (WebCore::TextAutosizer::processClusterInternal):
1344
1345             Common implementation for processCluster() and processCompositeCluster that accepts the
1346             text width and whether the cluster should be autosized as parameters instead of
1347             calculating it inline.
1348
1349         (WebCore::TextAutosizer::processCluster):
1350
1351             Calculates the text width for a single cluster and whether it should be autosized, then
1352             calls processClusterInternal() to apply the multiplier and process the cluster's
1353             descendants.
1354
1355         (WebCore::TextAutosizer::processCompositeCluster):
1356
1357             Calculates the text width for a group of renderers and if the group should be autosized,
1358             then calls processClusterInternal() repeatedly with the same multiplier to apply it and
1359             process all the descendants of the group.
1360
1361         (WebCore::TextAutosizer::clusterShouldBeAutosized):
1362
1363             Calls the multiple renderers version to avoid code duplication.
1364
1365         (WebCore::TextAutosizer::compositeClusterShouldBeAutosized):
1366
1367             The multiple renderers version of clusterShouldBeAutosized.
1368
1369         * rendering/TextAutosizer.h:
1370
1371             Updated method declarations.
1372
1373 2013-02-14  Andrey Adaikin  <aandrey@chromium.org>
1374
1375         Look into possibilities of typedef in webkit idl files
1376         https://bugs.webkit.org/show_bug.cgi?id=52340
1377
1378         Reviewed by Kentaro Hara.
1379
1380         Add typedef support for WebKit IDL parser.
1381         Drive by: fixed a bug of generating "unrestrictedfloat" without a space.
1382
1383         Added a new IDL test TestTypedefs.idl. The results were generated without typedefs.
1384
1385         * bindings/scripts/IDLParser.pm:
1386         (assertNoExtendedAttributesInTypedef):
1387         (parseDefinitions):
1388         (applyTypedefs):
1389         (applyTypedefsForSignature):
1390         (parseTypedef):
1391         (parseUnrestrictedFloatType):
1392         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Added.
1393         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate::WebDOMTestTypedefsPrivate):
1394         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate):
1395         (WebDOMTestTypedefs::WebDOMTestTypedefs):
1396         (WebDOMTestTypedefs::operator=):
1397         (WebDOMTestTypedefs::impl):
1398         (WebDOMTestTypedefs::~WebDOMTestTypedefs):
1399         (WebDOMTestTypedefs::unsignedLongLongAttr):
1400         (WebDOMTestTypedefs::setUnsignedLongLongAttr):
1401         (WebDOMTestTypedefs::immutableSerializedScriptValue):
1402         (WebDOMTestTypedefs::setImmutableSerializedScriptValue):
1403         (WebDOMTestTypedefs::func):
1404         (WebDOMTestTypedefs::multiTransferList):
1405         (WebDOMTestTypedefs::setShadow):
1406         (WebDOMTestTypedefs::nullableArrayArg):
1407         (WebDOMTestTypedefs::immutablePointFunction):
1408         (toWebCore):
1409         (toWebKit):
1410         * bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Added.
1411         (WebCore):
1412         (WebDOMTestTypedefs):
1413         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: Added.
1414         (_WebKitDOMTestTypedefsPrivate):
1415         (WebKit):
1416         (WebKit::kit):
1417         (WebKit::core):
1418         (WebKit::wrapTestTypedefs):
1419         (webkit_dom_test_typedefs_finalize):
1420         (webkit_dom_test_typedefs_set_property):
1421         (webkit_dom_test_typedefs_get_property):
1422         (webkit_dom_test_typedefs_constructor):
1423         (webkit_dom_test_typedefs_class_init):
1424         (webkit_dom_test_typedefs_init):
1425         (webkit_dom_test_typedefs_func):
1426         (webkit_dom_test_typedefs_multi_transfer_list):
1427         (webkit_dom_test_typedefs_set_shadow):
1428         (webkit_dom_test_typedefs_nullable_array_arg):
1429         (webkit_dom_test_typedefs_immutable_point_function):
1430         (webkit_dom_test_typedefs_string_array_function):
1431         (webkit_dom_test_typedefs_get_unsigned_long_long_attr):
1432         (webkit_dom_test_typedefs_set_unsigned_long_long_attr):
1433         (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
1434         (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
1435         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: Added.
1436         (_WebKitDOMTestTypedefs):
1437         (_WebKitDOMTestTypedefsClass):
1438         * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: Added.
1439         (WebKit):
1440         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added.
1441         (WebCore):
1442         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
1443         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
1444         (WebCore::JSTestTypedefsConstructor::finishCreation):
1445         (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
1446         (WebCore::JSTestTypedefsConstructor::getOwnPropertyDescriptor):
1447         (WebCore::JSTestTypedefsConstructor::getConstructData):
1448         (WebCore::JSTestTypedefsPrototype::self):
1449         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
1450         (WebCore::JSTestTypedefsPrototype::getOwnPropertyDescriptor):
1451         (WebCore::JSTestTypedefs::JSTestTypedefs):
1452         (WebCore::JSTestTypedefs::finishCreation):
1453         (WebCore::JSTestTypedefs::createPrototype):
1454         (WebCore::JSTestTypedefs::destroy):
1455         (WebCore::JSTestTypedefs::~JSTestTypedefs):
1456         (WebCore::JSTestTypedefs::getOwnPropertySlot):
1457         (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
1458         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
1459         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
1460         (WebCore::jsTestTypedefsConstructorTestSubObj):
1461         (WebCore::jsTestTypedefsConstructor):
1462         (WebCore::JSTestTypedefs::put):
1463         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
1464         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
1465         (WebCore::JSTestTypedefs::getConstructor):
1466         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
1467         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
1468         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
1469         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
1470         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
1471         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
1472         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
1473         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
1474         (WebCore::isObservable):
1475         (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
1476         (WebCore::JSTestTypedefsOwner::finalize):
1477         (WebCore::toJS):
1478         (WebCore::toTestTypedefs):
1479         * bindings/scripts/test/JS/JSTestTypedefs.h: Added.
1480         (WebCore):
1481         (JSTestTypedefs):
1482         (WebCore::JSTestTypedefs::create):
1483         (WebCore::JSTestTypedefs::createStructure):
1484         (WebCore::JSTestTypedefs::impl):
1485         (WebCore::JSTestTypedefs::releaseImpl):
1486         (WebCore::JSTestTypedefs::releaseImplIfNotNull):
1487         (JSTestTypedefsOwner):
1488         (WebCore::wrapperOwner):
1489         (WebCore::wrapperContext):
1490         (JSTestTypedefsPrototype):
1491         (WebCore::JSTestTypedefsPrototype::create):
1492         (WebCore::JSTestTypedefsPrototype::createStructure):
1493         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
1494         (JSTestTypedefsConstructor):
1495         (WebCore::JSTestTypedefsConstructor::create):
1496         (WebCore::JSTestTypedefsConstructor::createStructure):
1497         * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Added.
1498         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Added.
1499         (-[DOMTestTypedefs dealloc]):
1500         (-[DOMTestTypedefs finalize]):
1501         (-[DOMTestTypedefs unsignedLongLongAttr]):
1502         (-[DOMTestTypedefs setUnsignedLongLongAttr:]):
1503         (-[DOMTestTypedefs immutableSerializedScriptValue]):
1504         (-[DOMTestTypedefs setImmutableSerializedScriptValue:]):
1505         (-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
1506         (-[DOMTestTypedefs setShadow:height:blur:color:alpha:]):
1507         (-[DOMTestTypedefs immutablePointFunction]):
1508         (core):
1509         (kit):
1510         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Added.
1511         (WebCore):
1512         * bindings/scripts/test/TestTypedefs.idl: Added.
1513         * bindings/scripts/test/V8/V8TestTypedefs.cpp: Added.
1514         (WebCore):
1515         (WebCore::checkTypeOrDieTrying):
1516         (TestTypedefsV8Internal):
1517         (WebCore::TestTypedefsV8Internal::V8_USE):
1518         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter):
1519         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
1520         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter):
1521         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
1522         (WebCore::TestTypedefsV8Internal::TestTypedefsConstructorGetter):
1523         (WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter):
1524         (WebCore::TestTypedefsV8Internal::funcCallback):
1525         (WebCore::TestTypedefsV8Internal::multiTransferListCallback):
1526         (WebCore::TestTypedefsV8Internal::setShadowCallback):
1527         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
1528         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
1529         (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
1530         (WebCore::TestTypedefsV8Internal::immutablePointFunctionCallback):
1531         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
1532         (WebCore::V8TestTypedefs::constructorCallback):
1533         (WebCore::ConfigureV8TestTypedefsTemplate):
1534         (WebCore::V8TestTypedefs::GetRawTemplate):
1535         (WebCore::V8TestTypedefs::GetTemplate):
1536         (WebCore::V8TestTypedefs::HasInstance):
1537         (WebCore::V8TestTypedefs::createWrapper):
1538         (WebCore::V8TestTypedefs::derefObject):
1539         * bindings/scripts/test/V8/V8TestTypedefs.h: Added.
1540         (WebCore):
1541         (V8TestTypedefs):
1542         (WebCore::V8TestTypedefs::toNative):
1543         (WebCore::V8TestTypedefs::installPerContextProperties):
1544         (WebCore::V8TestTypedefs::installPerContextPrototypeProperties):
1545         (WebCore::wrap):
1546         (WebCore::toV8):
1547         (WebCore::toV8Fast):
1548
1549 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1550
1551         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
1552         and XXXAccessorSetter() to XXXAttrSetterCustom()
1553         https://bugs.webkit.org/show_bug.cgi?id=109679
1554
1555         Reviewed by Adam Barth.
1556
1557         For naming consistency and clarification.
1558
1559         No tests. No change in behavior.
1560
1561         * bindings/scripts/CodeGeneratorV8.pm:
1562         (GenerateHeader):
1563         (GenerateHeaderCustomCall):
1564         (GenerateNormalAttrGetter):
1565         (GenerateNormalAttrSetter):
1566         (GenerateImplementation):
1567         * bindings/scripts/test/V8/V8TestInterface.cpp:
1568         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1569         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1570         * bindings/scripts/test/V8/V8TestObj.cpp:
1571         (WebCore::TestObjV8Internal::customAttrAttrGetter):
1572         (WebCore::TestObjV8Internal::customAttrAttrSetter):
1573         * bindings/scripts/test/V8/V8TestObj.h:
1574         (V8TestObj):
1575         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
1576         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
1577         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
1578         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
1579         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1580         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
1581         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
1582         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
1583         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
1584         * bindings/v8/custom/V8ClipboardCustom.cpp:
1585         (WebCore::V8Clipboard::typesAttrGetterCustom):
1586         * bindings/v8/custom/V8CoordinatesCustom.cpp:
1587         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
1588         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
1589         (WebCore::V8Coordinates::headingAttrGetterCustom):
1590         (WebCore::V8Coordinates::speedAttrGetterCustom):
1591         * bindings/v8/custom/V8CustomEventCustom.cpp:
1592         (WebCore::V8CustomEvent::detailAttrGetterCustom):
1593         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1594         (WebCore::V8DOMWindow::eventAttrGetterCustom):
1595         (WebCore::V8DOMWindow::eventAttrSetterCustom):
1596         (WebCore::V8DOMWindow::locationAttrSetterCustom):
1597         (WebCore::V8DOMWindow::openerAttrSetterCustom):
1598         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1599         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
1600         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
1601         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
1602         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
1603         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1604         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
1605         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
1606         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
1607         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
1608         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
1609         (WebCore::V8Document::locationAttrGetterCustom):
1610         (WebCore::V8Document::locationAttrSetterCustom):
1611         * bindings/v8/custom/V8EventCustom.cpp:
1612         (WebCore::V8Event::dataTransferAttrGetterCustom):
1613         (WebCore::V8Event::clipboardDataAttrGetterCustom):
1614         * bindings/v8/custom/V8FileReaderCustom.cpp:
1615         (WebCore::V8FileReader::resultAttrGetterCustom):
1616         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1617         (WebCore::V8HTMLDocument::allAttrSetterCustom):
1618         * bindings/v8/custom/V8HTMLElementCustom.cpp:
1619         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
1620         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
1621         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
1622         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
1623         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1624         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
1625         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
1626         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
1627         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
1628         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
1629         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
1630         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
1631         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
1632         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
1633         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
1634         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
1635         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1636         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
1637         * bindings/v8/custom/V8HistoryCustom.cpp:
1638         (WebCore::V8History::stateAttrGetterCustom):
1639         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1640         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
1641         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
1642         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
1643         * bindings/v8/custom/V8LocationCustom.cpp:
1644         (WebCore::V8Location::hashAttrSetterCustom):
1645         (WebCore::V8Location::hostAttrSetterCustom):
1646         (WebCore::V8Location::hostnameAttrSetterCustom):
1647         (WebCore::V8Location::hrefAttrSetterCustom):
1648         (WebCore::V8Location::pathnameAttrSetterCustom):
1649         (WebCore::V8Location::portAttrSetterCustom):
1650         (WebCore::V8Location::protocolAttrSetterCustom):
1651         (WebCore::V8Location::searchAttrSetterCustom):
1652         (WebCore::V8Location::reloadAttrGetterCustom):
1653         (WebCore::V8Location::replaceAttrGetterCustom):
1654         (WebCore::V8Location::assignAttrGetterCustom):
1655         * bindings/v8/custom/V8MessageEventCustom.cpp:
1656         (WebCore::V8MessageEvent::dataAttrGetterCustom):
1657         (WebCore::V8MessageEvent::portsAttrGetterCustom):
1658         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
1659         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
1660         * bindings/v8/custom/V8PannerNodeCustom.cpp:
1661         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
1662         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
1663         * bindings/v8/custom/V8PopStateEventCustom.cpp:
1664         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
1665         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1666         (WebCore::V8SVGLength::valueAttrGetterCustom):
1667         (WebCore::V8SVGLength::valueAttrSetterCustom):
1668         * bindings/v8/custom/V8TrackEventCustom.cpp:
1669         (WebCore::V8TrackEvent::trackAttrGetterCustom):
1670         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
1671         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
1672         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1673         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
1674         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
1675
1676 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
1677
1678         Web Inspector: extract DOM counters graph implementation into its own class
1679         https://bugs.webkit.org/show_bug.cgi?id=109796
1680
1681         Reviewed by Alexander Pavlov.
1682
1683         Extracted DOM counters graph implementation into DOMCountersGraph.js leaving
1684         in MemoryStatistics.js only common parts shared with NativeMemoryGraph.js
1685         Added some closure annotations and converted object literals into classes
1686         with named constructors.
1687
1688         * WebCore.gypi:
1689         * WebCore.vcproj/WebCore.vcproj:
1690         * inspector/compile-front-end.py:
1691         * inspector/front-end/DOMCountersGraph.js: Added.
1692         (WebInspector.DOMCountersGraph):
1693         (WebInspector.DOMCounterUI):
1694         (WebInspector.DOMCountersGraph.Counter):
1695         (WebInspector.DOMCounterUI.prototype.setRange):
1696         (WebInspector.DOMCounterUI.prototype.updateCurrentValue):
1697         (WebInspector.DOMCounterUI.prototype.clearCurrentValueAndMarker):
1698         (WebInspector.DOMCounterUI.prototype.saveImageUnderMarker):
1699         (WebInspector.DOMCounterUI.prototype.restoreImageUnderMarker):
1700         (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
1701         (WebInspector.DOMCountersGraph.prototype._createCurrentValuesBar):
1702         (WebInspector.DOMCountersGraph.prototype._createCounterUIList):
1703         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getNodeCount):
1704         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getListenerCount):
1705         (WebInspector.DOMCountersGraph.prototype._canvasHeight):
1706         (WebInspector.DOMCountersGraph.prototype._onRecordAdded):
1707         (WebInspector.DOMCountersGraph.prototype._draw):
1708         (WebInspector.DOMCountersGraph.prototype._restoreImageUnderMarker):
1709         (WebInspector.DOMCountersGraph.prototype._saveImageUnderMarker):
1710         (WebInspector.DOMCountersGraph.prototype._drawMarker):
1711         (WebInspector.DOMCountersGraph.prototype._drawGraph):
1712         (WebInspector.DOMCountersGraph.prototype._discardImageUnderMarker):
1713         * inspector/front-end/MemoryStatistics.js:
1714         (WebInspector.MemoryStatistics):
1715         (WebInspector.MemoryStatistics.Counter):
1716         (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
1717         (WebInspector.MemoryStatistics.prototype._createCounterUIList):
1718         (WebInspector.MemoryStatistics.prototype.setTopPosition):
1719         (WebInspector.MemoryStatistics.prototype._canvasHeight):
1720         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
1721         (WebInspector.MemoryStatistics.prototype._draw):
1722         (WebInspector.MemoryStatistics.prototype._onClick):
1723         (WebInspector.MemoryStatistics.prototype._onMouseOut):
1724         (WebInspector.MemoryStatistics.prototype._onMouseOver):
1725         (WebInspector.MemoryStatistics.prototype._onMouseMove):
1726         (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
1727         (WebInspector.MemoryStatistics.prototype._drawMarker):
1728         (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
1729         * inspector/front-end/NativeMemoryGraph.js:
1730         (WebInspector.NativeMemoryGraph.Counter):
1731         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
1732         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
1733         (WebInspector.NativeMemoryGraph.prototype._draw):
1734         * inspector/front-end/TimelinePanel.js:
1735         * inspector/front-end/WebKit.qrc:
1736
1737 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
1738
1739         Web Inspector: Native Memory Instrumentation: Report child nodes as direct members of a container node to make them look like a tree in the snapshot.
1740         https://bugs.webkit.org/show_bug.cgi?id=109703
1741
1742         Also we need to traverse the tree from the top root element down to the leaves.
1743
1744         Reviewed by Yury Semikhatsky.
1745
1746         * dom/ContainerNode.cpp:
1747         (WebCore::ContainerNode::reportMemoryUsage):
1748         * dom/Node.cpp:
1749         (WebCore::Node::reportMemoryUsage):
1750         * inspector/InspectorMemoryAgent.cpp:
1751         (WebCore):
1752
1753 2013-02-13  Hayato Ito  <hayato@chromium.org>
1754
1755         [Shadow DOM] Implements a '::distributed()' pseudo element.
1756         https://bugs.webkit.org/show_bug.cgi?id=82169
1757
1758         Reviewed by Dimitri Glazkov.
1759
1760         Implements a '::distributed()' pseudo element.
1761         See the Shadow DOM specification and the filed bug for the detail.
1762
1763         - http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#selecting-nodes-distributed-to-insertion-points
1764         - https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684
1765
1766         For example, suppose we are given the following DOM tree and shadow tree:
1767
1768         - <A>
1769           - <B>
1770             - <C>
1771
1772         [A's ShadowRoot]
1773           <D>
1774           - <style>
1775               E content::distributed(B C) { color: green; }
1776           - <E>
1777             - <content>  (Node B is distributed to this insertion point.)
1778
1779         In this case, the style rule defined in the shadow tree matches node 'C'.
1780
1781         A '::distributed()' pseudo element can not be a pseudo class since
1782         an intersection between matched_elements(some_selector) and
1783         matched_elements(some_selector::distributed(...)) is always an
1784         empty set. A '::distributed()' pseudo element is the first-ever
1785         *functional* pseudo element which takes a parameter, which can be
1786         a selector.
1787
1788         This rule crosses the shadow boundary from a shadow tree to the
1789         tree of its shadow host. That means a rule which includes
1790         '::distributed()' pseudo element is defined in shadow tree, but
1791         the node which is matched in the rule, the subject of the
1792         selector, is outside of the shadow tree. Therefore, we cannot
1793         predict where the subject of the selector will be beforehand.
1794         Current CSS implementation assumes the subject of the selector
1795         must exist in the current scope.
1796
1797         To overcome this issue, DocumentRuleSets now has a instance of
1798         ShadowDistributedRules class.  A style rule will be stored in this
1799         instance if the rule includes a '::distributed()' pseudo element.
1800         This class also keeps track of each RuleSet by mapping it with a
1801         scope where the rule was originally defined. In the example, the
1802         scope is A's ShadowRoot.  The scope is used to check whether the
1803         left-most matched element (in the example, it's a node 'E') exists
1804         in the scope.
1805
1806         Internally, a '::distributed' pseudo element is represented by a
1807         newly introduced 'ShadowDistributed' relation.  That makes an
1808         implementation of SelectorChecker::checkSelector() much simpler.
1809         A transformation from a distributed pseudo element to a
1810         ShadowDistributed is done in parsing stage of CSS.
1811
1812         Since '::distributed()' is an experimental feature, it's actually
1813         prefixed with '-webkit-' and guarded by SHADOW_DOM flag.
1814
1815         Tests: fast/dom/shadow/distributed-pseudo-element-for-shadow-element.html
1816                fast/dom/shadow/distributed-pseudo-element-match-all.html
1817                fast/dom/shadow/distributed-pseudo-element-match-descendant.html
1818                fast/dom/shadow/distributed-pseudo-element-nested.html
1819                fast/dom/shadow/distributed-pseudo-element-no-match.html
1820                fast/dom/shadow/distributed-pseudo-element-reprojection.html
1821                fast/dom/shadow/distributed-pseudo-element-scoped.html
1822                fast/dom/shadow/distributed-pseudo-element-support-selector.html
1823                fast/dom/shadow/distributed-pseudo-element-used-in-selector-list.html
1824                fast/dom/shadow/distributed-pseudo-element-with-any.html
1825                fast/dom/shadow/distributed-pseudo-element.html
1826
1827         * css/CSSGrammar.y.in:
1828         CSS Grammar was updated to support '::distrbuted(selector)'.
1829         This pseudo element is the first pseudo element which can take a selector as a parameter.
1830         * css/CSSParser.cpp:
1831         (WebCore::CSSParser::detectDashToken):
1832         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
1833         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
1834         Here we are converting a '::distributed' pseudo element into a
1835         ShadowDistributed relation internally.  To support the conversion,
1836         these rewriteSpecifiersXXX functions (formally called
1837         updateSpecifiersXXX) now return the specifiers which may be
1838         converted.
1839         (WebCore::CSSParser::rewriteSpecifiers):
1840         * css/CSSParser.h:
1841         * css/CSSParserValues.cpp:
1842         (WebCore::CSSParserSelector::CSSParserSelector):
1843         * css/CSSParserValues.h:
1844         (CSSParserSelector):
1845         (WebCore::CSSParserSelector::functionArgumentSelector):
1846         To hold an intermediate selector which appears at the position of an argument in
1847         functional pseudo element when parsing CSS.
1848         (WebCore::CSSParserSelector::setFunctionArgumentSelector):
1849         (WebCore::CSSParserSelector::isDistributedPseudoElement):
1850         * css/CSSSelector.cpp:
1851         Add new pseudo element, PseudoDistributed, and its internal representation, ShadowDistributed relation.
1852         (WebCore::CSSSelector::pseudoId):
1853         (WebCore::nameToPseudoTypeMap):
1854         (WebCore::CSSSelector::extractPseudoType):
1855         (WebCore::CSSSelector::selectorText):
1856         * css/CSSSelector.h:
1857         (CSSSelector):
1858         (WebCore):
1859         (WebCore::CSSSelector::isDistributedPseudoElement):
1860         (WebCore::CSSSelector::isShadowDistributed):
1861         * css/CSSSelectorList.cpp:
1862         (WebCore):
1863         (SelectorHasShadowDistributed):
1864         (WebCore::SelectorHasShadowDistributed::operator()):
1865         (WebCore::CSSSelectorList::hasShadowDistributedAt):
1866         * css/CSSSelectorList.h:
1867         (CSSSelectorList):
1868         * css/DocumentRuleSets.cpp:
1869         (WebCore):
1870         (WebCore::ShadowDistributedRules::addRule):
1871         Every CSS rule which includes '::distributed(...)' should be managed by calling this function.
1872         (WebCore::ShadowDistributedRules::collectMatchRequests):
1873         (WebCore::DocumentRuleSets::resetAuthorStyle):
1874         * css/DocumentRuleSets.h:
1875         (WebCore):
1876         (ShadowDistributedRules):
1877         (WebCore::ShadowDistributedRules::clear):
1878         (DocumentRuleSets):
1879         (WebCore::DocumentRuleSets::shadowDistributedRules)
1880         DocumentRuleSets owns an instance of ShadowDistributedRules.
1881         * css/RuleSet.cpp:
1882         (WebCore::RuleSet::addChildRules):
1883         Updated to check whether the rule contains '::distributed()' or not.
1884         * css/SelectorChecker.cpp:
1885         (WebCore::SelectorChecker::match):
1886         Support ShadowDistributed relation. Check all possible insertion points where a node is distributed.
1887         * css/SelectorChecker.h:
1888         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
1889         Adds enum of BehaviorAtBoundary. '::distributed()' is the only
1890         rule which uses 'CrossedBoundary' since it is the only rule which
1891         crosses shadow boundaries.
1892         (SelectorCheckingContext):
1893         * css/SelectorFilter.cpp:
1894         (WebCore::SelectorFilter::collectIdentifierHashes):
1895         * css/StyleResolver.cpp:
1896         (WebCore::StyleResolver::collectMatchingRules):
1897         (WebCore::StyleResolver::matchAuthorRules):
1898         (WebCore::StyleResolver::collectMatchingRulesForList):
1899         (WebCore::StyleResolver::ruleMatches):
1900         * css/StyleResolver.h:
1901         (MatchRequest):
1902         (WebCore::MatchRequest::MatchRequest): Add behaviorAtBoundary field.
1903         (WebCore):
1904         (StyleResolver):
1905         * html/shadow/InsertionPoint.cpp:
1906         (WebCore::collectInsertionPointsWhereNodeIsDistributed):
1907         (WebCore):
1908         * html/shadow/InsertionPoint.h:
1909         (WebCore):
1910
1911 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1912
1913         [V8] Generate wrapper methods for custom methods
1914         https://bugs.webkit.org/show_bug.cgi?id=109678
1915
1916         Reviewed by Adam Barth.
1917
1918         Currently V8 directly calls back custom methods written
1919         in custom binding files. This makes it impossible for code
1920         generators to hook custom methods (e.g. Code generators cannot
1921         insert a code for FeatureObservation into custom methods).
1922         To solve the problem, we should generate wrapper methods for
1923         custom methods.
1924
1925         No tests. No change in behavior.
1926
1927         * page/DOMWindow.idl: Removed overloaded methods. The fact that methods in an IDL
1928         file are overloaded but they are not overloaded in custom bindings confuses code
1929         generators. (For some reason, this problem hasn't appeared before this change.)
1930         * xml/XMLHttpRequest.idl: Ditto.
1931
1932         * bindings/scripts/CodeGeneratorV8.pm:
1933         (GenerateHeader):
1934         (GenerateDomainSafeFunctionGetter):
1935         (GenerateEventListenerCallback):
1936         (GenerateFunctionCallback):
1937         (GenerateNonStandardFunction):
1938         (GenerateImplementation):
1939         * bindings/scripts/test/V8/V8TestInterface.cpp:
1940         (WebCore::TestInterfaceV8Internal::supplementalMethod3Callback):
1941         (TestInterfaceV8Internal):
1942         (WebCore):
1943         * bindings/scripts/test/V8/V8TestObj.cpp:
1944         (WebCore::TestObjV8Internal::customMethodCallback):
1945         (TestObjV8Internal):
1946         (WebCore::TestObjV8Internal::customMethodWithArgsCallback):
1947         (WebCore::TestObjV8Internal::classMethod2Callback):
1948         (WebCore):
1949         (WebCore::ConfigureV8TestObjTemplate):
1950         * bindings/scripts/test/V8/V8TestObj.h:
1951         (V8TestObj):
1952         * bindings/v8/custom/V8ClipboardCustom.cpp:
1953         (WebCore::V8Clipboard::clearDataCallbackCustom):
1954         (WebCore::V8Clipboard::setDragImageCallbackCustom):
1955         * bindings/v8/custom/V8ConsoleCustom.cpp:
1956         (WebCore::V8Console::traceCallbackCustom):
1957         (WebCore::V8Console::assertCallbackCustom):
1958         (WebCore::V8Console::profileCallbackCustom):
1959         (WebCore::V8Console::profileEndCallbackCustom):
1960         * bindings/v8/custom/V8CryptoCustom.cpp:
1961         (WebCore::V8Crypto::getRandomValuesCallbackCustom):
1962         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
1963         (WebCore::V8DOMFormData::appendCallbackCustom):
1964         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1965         (WebCore::V8DOMWindow::addEventListenerCallbackCustom):
1966         (WebCore::V8DOMWindow::removeEventListenerCallbackCustom):
1967         (WebCore::V8DOMWindow::postMessageCallbackCustom):
1968         (WebCore::V8DOMWindow::toStringCallbackCustom):
1969         (WebCore::V8DOMWindow::releaseEventsCallbackCustom):
1970         (WebCore::V8DOMWindow::captureEventsCallbackCustom):
1971         (WebCore::V8DOMWindow::showModalDialogCallbackCustom):
1972         (WebCore::V8DOMWindow::openCallbackCustom):
1973         (WebCore::V8DOMWindow::setTimeoutCallbackCustom):
1974         (WebCore::V8DOMWindow::setIntervalCallbackCustom):
1975         * bindings/v8/custom/V8DataViewCustom.cpp:
1976         (WebCore::V8DataView::getInt8CallbackCustom):
1977         (WebCore::V8DataView::getUint8CallbackCustom):
1978         (WebCore::V8DataView::setInt8CallbackCustom):
1979         (WebCore::V8DataView::setUint8CallbackCustom):
1980         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
1981         (WebCore::V8DedicatedWorkerContext::postMessageCallbackCustom):
1982         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1983         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallbackCustom):
1984         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1985         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallbackCustom):
1986         * bindings/v8/custom/V8DocumentCustom.cpp:
1987         (WebCore::V8Document::evaluateCallbackCustom):
1988         (WebCore::V8Document::createTouchListCallbackCustom):
1989         * bindings/v8/custom/V8GeolocationCustom.cpp:
1990         (WebCore::V8Geolocation::getCurrentPositionCallbackCustom):
1991         (WebCore::V8Geolocation::watchPositionCallbackCustom):
1992         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
1993         (WebCore::V8HTMLAllCollection::itemCallbackCustom):
1994         (WebCore::V8HTMLAllCollection::namedItemCallbackCustom):
1995         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1996         (WebCore::V8HTMLCanvasElement::getContextCallbackCustom):
1997         (WebCore::V8HTMLCanvasElement::toDataURLCallbackCustom):
1998         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1999         (WebCore::V8HTMLDocument::writeCallbackCustom):
2000         (WebCore::V8HTMLDocument::writelnCallbackCustom):
2001         (WebCore::V8HTMLDocument::openCallbackCustom):
2002         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
2003         (WebCore::V8HTMLFormControlsCollection::namedItemCallbackCustom):
2004         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2005         (WebCore::v8HTMLImageElementConstructorCallbackCustom):
2006         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
2007         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
2008         (WebCore::V8HTMLInputElement::setSelectionRangeCallbackCustom):
2009         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2010         (WebCore::V8HTMLOptionsCollection::namedItemCallbackCustom):
2011         (WebCore::V8HTMLOptionsCollection::removeCallbackCustom):
2012         (WebCore::V8HTMLOptionsCollection::addCallbackCustom):
2013         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
2014         (WebCore::V8HTMLSelectElement::removeCallbackCustom):
2015         * bindings/v8/custom/V8HistoryCustom.cpp:
2016         (WebCore::V8History::pushStateCallbackCustom):
2017         (WebCore::V8History::replaceStateCallbackCustom):
2018         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2019         (WebCore::V8InjectedScriptHost::inspectedObjectCallbackCustom):
2020         (WebCore::V8InjectedScriptHost::internalConstructorNameCallbackCustom):
2021         (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallbackCustom):
2022         (WebCore::V8InjectedScriptHost::typeCallbackCustom):
2023         (WebCore::V8InjectedScriptHost::functionDetailsCallbackCustom):
2024         (WebCore::V8InjectedScriptHost::getInternalPropertiesCallbackCustom):
2025         (WebCore::V8InjectedScriptHost::getEventListenersCallbackCustom):
2026         (WebCore::V8InjectedScriptHost::inspectCallbackCustom):
2027         (WebCore::V8InjectedScriptHost::databaseIdCallbackCustom):
2028         (WebCore::V8InjectedScriptHost::storageIdCallbackCustom):
2029         (WebCore::V8InjectedScriptHost::evaluateCallbackCustom):
2030         (WebCore::V8InjectedScriptHost::setFunctionVariableValueCallbackCustom):
2031         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
2032         (WebCore::V8InspectorFrontendHost::platformCallbackCustom):
2033         (WebCore::V8InspectorFrontendHost::portCallbackCustom):
2034         (WebCore::V8InspectorFrontendHost::showContextMenuCallbackCustom):
2035         (WebCore::V8InspectorFrontendHost::recordActionTakenCallbackCustom):
2036         (WebCore::V8InspectorFrontendHost::recordPanelShownCallbackCustom):
2037         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallbackCustom):
2038         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
2039         (WebCore::V8JavaScriptCallFrame::evaluateCallbackCustom):
2040         (WebCore::V8JavaScriptCallFrame::restartCallbackCustom):
2041         (WebCore::V8JavaScriptCallFrame::setVariableValueCallbackCustom):
2042         (WebCore::V8JavaScriptCallFrame::scopeTypeCallbackCustom):
2043         * bindings/v8/custom/V8LocationCustom.cpp:
2044         (WebCore::V8Location::reloadAccessorGetter):
2045         (WebCore::V8Location::replaceAccessorGetter):
2046         (WebCore::V8Location::assignAccessorGetter):
2047         (WebCore::V8Location::reloadCallbackCustom):
2048         (WebCore::V8Location::replaceCallbackCustom):
2049         (WebCore::V8Location::assignCallbackCustom):
2050         (WebCore::V8Location::valueOfCallbackCustom):
2051         (WebCore::V8Location::toStringCallbackCustom):
2052         * bindings/v8/custom/V8MessageEventCustom.cpp:
2053         (WebCore::V8MessageEvent::initMessageEventCallbackCustom):
2054         (WebCore::V8MessageEvent::webkitInitMessageEventCallbackCustom):
2055         * bindings/v8/custom/V8MessagePortCustom.cpp:
2056         (WebCore::V8MessagePort::postMessageCallbackCustom):
2057         * bindings/v8/custom/V8NodeCustom.cpp:
2058         (WebCore::V8Node::insertBeforeCallbackCustom):
2059         (WebCore::V8Node::replaceChildCallbackCustom):
2060         (WebCore::V8Node::removeChildCallbackCustom):
2061         (WebCore::V8Node::appendChildCallbackCustom):
2062         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
2063         (WebCore::V8NotificationCenter::requestPermissionCallbackCustom):
2064         * bindings/v8/custom/V8NotificationCustom.cpp:
2065         (WebCore::V8Notification::requestPermissionCallbackCustom):
2066         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
2067         (WebCore::V8SQLResultSetRowList::itemCallbackCustom):
2068         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
2069         (WebCore::V8SQLTransaction::executeSqlCallbackCustom):
2070         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
2071         (WebCore::V8SQLTransactionSync::executeSqlCallbackCustom):
2072         * bindings/v8/custom/V8SVGLengthCustom.cpp:
2073         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallbackCustom):
2074         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2075         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallbackCustom):
2076         (WebCore::V8WebGLRenderingContext::getBufferParameterCallbackCustom):
2077         (WebCore::V8WebGLRenderingContext::getExtensionCallbackCustom):
2078         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallbackCustom):
2079         (WebCore::V8WebGLRenderingContext::getParameterCallbackCustom):
2080         (WebCore::V8WebGLRenderingContext::getProgramParameterCallbackCustom):
2081         (WebCore::V8WebGLRenderingContext::getRenderbufferParameterCallbackCustom):
2082         (WebCore::V8WebGLRenderingContext::getShaderParameterCallbackCustom):
2083         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallbackCustom):
2084         (WebCore::V8WebGLRenderingContext::getTexParameterCallbackCustom):
2085         (WebCore::V8WebGLRenderingContext::getUniformCallbackCustom):
2086         (WebCore::V8WebGLRenderingContext::getVertexAttribCallbackCustom):
2087         (WebCore::V8WebGLRenderingContext::uniform1fvCallbackCustom):
2088         (WebCore::V8WebGLRenderingContext::uniform1ivCallbackCustom):
2089         (WebCore::V8WebGLRenderingContext::uniform2fvCallbackCustom):
2090         (WebCore::V8WebGLRenderingContext::uniform2ivCallbackCustom):
2091         (WebCore::V8WebGLRenderingContext::uniform3fvCallbackCustom):
2092         (WebCore::V8WebGLRenderingContext::uniform3ivCallbackCustom):
2093         (WebCore::V8WebGLRenderingContext::uniform4fvCallbackCustom):
2094         (WebCore::V8WebGLRenderingContext::uniform4ivCallbackCustom):
2095         (WebCore::V8WebGLRenderingContext::uniformMatrix2fvCallbackCustom):
2096         (WebCore::V8WebGLRenderingContext::uniformMatrix3fvCallbackCustom):
2097         (WebCore::V8WebGLRenderingContext::uniformMatrix4fvCallbackCustom):
2098         (WebCore::V8WebGLRenderingContext::vertexAttrib1fvCallbackCustom):
2099         (WebCore::V8WebGLRenderingContext::vertexAttrib2fvCallbackCustom):
2100         (WebCore::V8WebGLRenderingContext::vertexAttrib3fvCallbackCustom):
2101         (WebCore::V8WebGLRenderingContext::vertexAttrib4fvCallbackCustom):
2102         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2103         (WebCore::V8WorkerContext::importScriptsCallbackCustom):
2104         (WebCore::V8WorkerContext::setTimeoutCallbackCustom):
2105         (WebCore::V8WorkerContext::setIntervalCallbackCustom):
2106         * bindings/v8/custom/V8WorkerCustom.cpp:
2107         (WebCore::V8Worker::postMessageCallbackCustom):
2108         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2109         (WebCore::V8XMLHttpRequest::openCallbackCustom):
2110         (WebCore::V8XMLHttpRequest::sendCallbackCustom):
2111         * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
2112         (WebCore::V8XSLTProcessor::setParameterCallbackCustom):
2113         (WebCore::V8XSLTProcessor::getParameterCallbackCustom):
2114         (WebCore::V8XSLTProcessor::removeParameterCallbackCustom):
2115
2116 2013-02-13  Praveen R Jadhav  <praveen.j@samsung.com>
2117
2118         JSObject for ChannelSplitterNode and ChannelMergerNode are not created.
2119         https://bugs.webkit.org/show_bug.cgi?id=109542
2120
2121         Reviewed by Kentaro Hara.
2122
2123         "JSGenerateToJSObject" should be included in IDL files
2124         of ChannelSplitterNode and ChannelMergerNode in WebAudio.
2125         This ensures html files to access corresponding objects.
2126
2127         * Modules/webaudio/ChannelMergerNode.idl:
2128         * Modules/webaudio/ChannelSplitterNode.idl:
2129
2130 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
2131
2132         [Regression] After r142831  collection-null-like-arguments.html layout test failing
2133         https://bugs.webkit.org/show_bug.cgi?id=109780
2134
2135         Reviewed by Kentaro Hara.
2136
2137         No new tests. LayoutTests/fast/dom/collection-null-like-arguments.html
2138         Should pass now.
2139
2140         * bindings/js/JSHTMLAllCollectionCustom.cpp: Return null for namedItem() only.
2141         (WebCore::getNamedItems):
2142         (WebCore::JSHTMLAllCollection::namedItem):
2143         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
2144         (WebCore::getNamedItems):
2145         (WebCore::JSHTMLFormControlsCollection::namedItem):
2146         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
2147         (WebCore::getNamedItems):
2148         (WebCore::JSHTMLOptionsCollection::namedItem):
2149
2150 2013-02-13  Soo-Hyun Choi  <sh9.choi@samsung.com>
2151
2152         Fix indentation error in MediaPlayerPrivateGStreamer.h
2153         https://bugs.webkit.org/show_bug.cgi?id=109768
2154
2155         Reviewed by Kentaro Hara.
2156
2157         No new tests as this patch just changes indentation style.
2158
2159         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2160         (MediaPlayerPrivateGStreamer):
2161         (WebCore::MediaPlayerPrivateGStreamer::hasVideo):
2162         (WebCore::MediaPlayerPrivateGStreamer::hasAudio):
2163         (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
2164         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
2165
2166 2013-02-13  Adam Barth  <abarth@webkit.org>
2167
2168         TokenPreloadScanner should be (mostly!) thread-safe
2169         https://bugs.webkit.org/show_bug.cgi?id=109760
2170
2171         Reviewed by Eric Seidel.
2172
2173         This patch makes the bulk of TokenPreloadScanner thread-safe.  The one
2174         remaining wart is processPossibleBaseTag because it wants to grub
2175         around in the base tag's attributes. I have a plan for that, but it's
2176         going to need to wait for the next patch.
2177
2178         * html/parser/HTMLPreloadScanner.cpp:
2179         (WebCore::isStartTag):
2180         (WebCore::isStartOrEndTag):
2181         (WebCore::TokenPreloadScanner::identifierFor):
2182         (WebCore::TokenPreloadScanner::inititatorFor):
2183         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
2184         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2185         (TokenPreloadScanner::StartTagScanner):
2186         (WebCore::TokenPreloadScanner::processPossibleTemplateTag):
2187         (WebCore::TokenPreloadScanner::processPossibleStyleTag):
2188         (WebCore::TokenPreloadScanner::processPossibleBaseTag):
2189         (WebCore::TokenPreloadScanner::scan):
2190         (WebCore::HTMLPreloadScanner::scan):
2191         * html/parser/HTMLPreloadScanner.h:
2192         (WebCore):
2193
2194 2013-02-13  Adam Barth  <abarth@webkit.org>
2195
2196         StartTagScanner should be thread-safe
2197         https://bugs.webkit.org/show_bug.cgi?id=109750
2198
2199         Reviewed by Eric Seidel.
2200
2201         This patch weens the StartTagScanner off AtomicString using two
2202         techniques:
2203
2204         1) This patch creates an enum to represent the four tag names that the
2205            StartTagScanner needs to understand. Using an enum is better than
2206            using an AtomicString because we can use the enum on both the main
2207            thread and on the background thread.
2208
2209         2) For attributes, this patch uses threadSafeMatch. We're not able to
2210            use threadSafeMatch everywhere due to performance, but using it for
2211            attributes appears to be ok becaues we only call threadSafeMatch on
2212            the attributes of "interesting" tags.
2213
2214         I tested the performance of this patch using
2215         PerformanceTests/Parser/html-parser.html and did not see any slowdown.
2216         (There actually appeared to be a <1% speedup, but I'm attributing that
2217         to noise.)
2218
2219         * html/parser/HTMLPreloadScanner.cpp:
2220         (WebCore::identifierFor):
2221         (WebCore):
2222         (WebCore::inititatorFor):
2223         (WebCore::StartTagScanner::StartTagScanner):
2224         (WebCore::StartTagScanner::processAttributes):
2225         (StartTagScanner):
2226         (WebCore::StartTagScanner::createPreloadRequest):
2227         (WebCore::StartTagScanner::processAttribute):
2228         (WebCore::StartTagScanner::charset):
2229         (WebCore::StartTagScanner::resourceType):
2230         (WebCore::StartTagScanner::shouldPreload):
2231         (WebCore::HTMLPreloadScanner::processToken):
2232
2233 2013-02-13  Huang Dongsung  <luxtella@company100.net>
2234
2235         Coordinated Graphics: a long page is scaled vertically while loading.
2236         https://bugs.webkit.org/show_bug.cgi?id=109645
2237
2238         Reviewed by Noam Rosenthal.
2239
2240         When loading http://www.w3.org/TR/xpath-datamodel/, Coordinated Graphics draws
2241         vertically scaled contents. It is because there is the difference between the
2242         size of a layer and the size of CoordinatedBackingStore.
2243
2244         Currently, CoordinatedGraphicsScene notifies the size to CoordinatedBackingStore
2245         at the moment of creating, updating and removing a tile. However, it is not
2246         necessary to send tile-related messages when the size of layer is changed.
2247         So this patch resets the size of CoordinatedBackingStore when receiving the
2248         message that is created when the size is changed: SyncLayerState.
2249
2250         There is no current way to reliably test flicker issues.
2251
2252         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
2253           Add m_pendingSize to set m_size at the moment of flushing.
2254           After http://webkit.org/b/108294, m_pendingSize will be removed
2255           because the bug makes CoordinatedGraphicsScene execute all messages at
2256           the moment of flushing.
2257         (WebCore::CoordinatedBackingStore::setSize):
2258         (WebCore::CoordinatedBackingStore::commitTileOperations):
2259         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
2260         (CoordinatedBackingStore):
2261         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2262         (WebCore::CoordinatedGraphicsScene::prepareContentBackingStore):
2263         (WebCore::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
2264         (WebCore::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
2265         (WebCore::CoordinatedGraphicsScene::createTile):
2266         (WebCore::CoordinatedGraphicsScene::removeTile):
2267         (WebCore::CoordinatedGraphicsScene::updateTile):
2268
2269 2013-02-13  Kentaro Hara  <haraken@chromium.org>
2270
2271         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
2272         and XXXAccessorSetter() to XXXAttrSetterCustom()
2273         https://bugs.webkit.org/show_bug.cgi?id=109679
2274
2275         Reviewed by Adam Barth.
2276
2277         For naming consistency and clarification.
2278
2279         No tests. No change in behavior.
2280
2281         * bindings/scripts/CodeGeneratorV8.pm:
2282         (GenerateHeader):
2283         (GenerateHeaderCustomCall):
2284         (GenerateNormalAttrGetter):
2285         (GenerateNormalAttrSetter):
2286         (GenerateImplementation):
2287         * bindings/scripts/test/V8/V8TestInterface.cpp:
2288         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
2289         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
2290         * bindings/scripts/test/V8/V8TestObj.cpp:
2291         (WebCore::TestObjV8Internal::customAttrAttrGetter):
2292         (WebCore::TestObjV8Internal::customAttrAttrSetter):
2293         * bindings/scripts/test/V8/V8TestObj.h:
2294         (V8TestObj):
2295         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
2296         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
2297         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
2298         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
2299         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
2300         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
2301         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
2302         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
2303         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
2304         * bindings/v8/custom/V8ClipboardCustom.cpp:
2305         (WebCore::V8Clipboard::typesAttrGetterCustom):
2306         * bindings/v8/custom/V8CoordinatesCustom.cpp:
2307         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
2308         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
2309         (WebCore::V8Coordinates::headingAttrGetterCustom):
2310         (WebCore::V8Coordinates::speedAttrGetterCustom):
2311         * bindings/v8/custom/V8CustomEventCustom.cpp:
2312         (WebCore::V8CustomEvent::detailAttrGetterCustom):
2313         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2314         (WebCore::V8DOMWindow::eventAttrGetterCustom):
2315         (WebCore::V8DOMWindow::eventAttrSetterCustom):
2316         (WebCore::V8DOMWindow::locationAttrSetterCustom):
2317         (WebCore::V8DOMWindow::openerAttrSetterCustom):
2318         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
2319         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
2320         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
2321         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
2322         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
2323         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
2324         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
2325         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
2326         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
2327         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
2328         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
2329         (WebCore::V8Document::locationAttrGetterCustom):
2330         (WebCore::V8Document::locationAttrSetterCustom):
2331         * bindings/v8/custom/V8EventCustom.cpp:
2332         (WebCore::V8Event::dataTransferAttrGetterCustom):
2333         (WebCore::V8Event::clipboardDataAttrGetterCustom):
2334         * bindings/v8/custom/V8FileReaderCustom.cpp:
2335         (WebCore::V8FileReader::resultAttrGetterCustom):
2336         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2337         (WebCore::V8HTMLDocument::allAttrSetterCustom):
2338         * bindings/v8/custom/V8HTMLElementCustom.cpp:
2339         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
2340         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
2341         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
2342         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
2343         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
2344         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
2345         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
2346         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
2347         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
2348         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
2349         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
2350         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
2351         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
2352         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
2353         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
2354         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
2355         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2356         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
2357         * bindings/v8/custom/V8HistoryCustom.cpp:
2358         (WebCore::V8History::stateAttrGetterCustom):
2359         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
2360         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
2361         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
2362         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
2363         * bindings/v8/custom/V8LocationCustom.cpp:
2364         (WebCore::V8Location::hashAttrSetterCustom):
2365         (WebCore::V8Location::hostAttrSetterCustom):
2366         (WebCore::V8Location::hostnameAttrSetterCustom):
2367         (WebCore::V8Location::hrefAttrSetterCustom):
2368         (WebCore::V8Location::pathnameAttrSetterCustom):
2369         (WebCore::V8Location::portAttrSetterCustom):
2370         (WebCore::V8Location::protocolAttrSetterCustom):
2371         (WebCore::V8Location::searchAttrSetterCustom):
2372         (WebCore::V8Location::reloadAttrGetterCustom):
2373         (WebCore::V8Location::replaceAttrGetterCustom):
2374         (WebCore::V8Location::assignAttrGetterCustom):
2375         * bindings/v8/custom/V8MessageEventCustom.cpp:
2376         (WebCore::V8MessageEvent::dataAttrGetterCustom):
2377         (WebCore::V8MessageEvent::portsAttrGetterCustom):
2378         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
2379         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
2380         * bindings/v8/custom/V8PannerNodeCustom.cpp:
2381         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
2382         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
2383         * bindings/v8/custom/V8PopStateEventCustom.cpp:
2384         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
2385         * bindings/v8/custom/V8SVGLengthCustom.cpp:
2386         (WebCore::V8SVGLength::valueAttrGetterCustom):
2387         (WebCore::V8SVGLength::valueAttrSetterCustom):
2388         * bindings/v8/custom/V8TrackEventCustom.cpp:
2389         (WebCore::V8TrackEvent::trackAttrGetterCustom):
2390         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
2391         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
2392         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2393         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
2394         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
2395
2396 2013-02-12  Kentaro Hara  <haraken@chromium.org>
2397
2398         [V8] Generate wrapper methods for custom getters/setters
2399         https://bugs.webkit.org/show_bug.cgi?id=109666
2400
2401         Reviewed by Adam Barth.
2402
2403         Currently V8 directly calls back custom getters/setters written
2404         in custom binding files. This makes it impossible for code generators
2405         to hook custom getters/setters (e.g. Code generators cannot insert a code
2406         for FeatureObservation into custom getters/setters). To solve the problem,
2407         we should generate wrapper methods for custom getters/setters.
2408
2409         No tests. No change in behavior.
2410
2411         * bindings/scripts/CodeGeneratorV8.pm:
2412         (GenerateNormalAttrGetter):
2413         (GenerateNormalAttrSetter):
2414         (GenerateSingleBatchedAttribute):
2415         (GenerateImplementation):
2416         * bindings/scripts/test/V8/V8TestInterface.cpp:
2417         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
2418         (TestInterfaceV8Internal):
2419         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
2420         (WebCore):
2421         * bindings/scripts/test/V8/V8TestObj.cpp:
2422         (WebCore::TestObjV8Internal::customAttrAttrGetter):
2423         (TestObjV8Internal):
2424         (WebCore::TestObjV8Internal::customAttrAttrSetter):
2425         (WebCore):
2426
2427 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
2428
2429         HTMLCollections namedItem() methods should return null than undefined for empty collections.
2430         https://bugs.webkit.org/show_bug.cgi?id=104096
2431
2432         Reviewed by Kentaro Hara.
2433
2434         As per specification namedItem() should return null if collection is empty.
2435         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection
2436
2437         Test: fast/dom/htmlcollection-namedItem.html
2438
2439         * bindings/js/JSHTMLAllCollectionCustom.cpp: Returning null.
2440         (WebCore::getNamedItems):
2441         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
2442         (WebCore::getNamedItems):
2443         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
2444         (WebCore::getNamedItems):
2445         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Ditto.
2446         (WebCore::V8HTMLAllCollection::namedItemCallback):
2447         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Ditto.
2448         (WebCore::V8HTMLFormControlsCollection::namedItemCallback):
2449         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: Ditto.
2450         (WebCore::V8HTMLOptionsCollection::namedItemCallback):
2451
2452 2013-02-13  Tony Gentilcore  <tonyg@chromium.org>
2453
2454         Fix svg/in-html/script-write.html with threaded HTML parser
2455         https://bugs.webkit.org/show_bug.cgi?id=109495
2456
2457         Reviewed by Eric Seidel.
2458
2459         This patch makes the background parser's simulateTreeBuilder() more realistic.
2460         1. The HTMLTreeBuilder does not call the updateStateFor() setState()s when in foreign content mode so we shouldn't do it when simulating the tree builder.
2461         2. HTMLTreeBuilder::processTokenInForeignContent has a list of tags which exit foreign content mode. We need to respect those.
2462         3. Support the <foreignObject> tag which enters and leaves foreign content mode.
2463         4. The tree builder sets state to DataState upon a </script> tag when not in foreign content mode. We need to do the same.
2464
2465         This involved creating a namespace stack where we push upon entering each namespace and pop upon leaving.
2466         We are in foreign content if the topmost namespace is SVG or MathML.
2467
2468         This fixes svg/in-html/script-write.html and likely others.
2469
2470         * html/parser/BackgroundHTMLParser.cpp:
2471         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
2472         * html/parser/BackgroundHTMLParser.h:
2473         (BackgroundHTMLParser):
2474         * html/parser/CompactHTMLToken.cpp:
2475         (WebCore::CompactHTMLToken::getAttributeItem): Returns the attribute of the given name. Necessary to test for <font> attributes in simulateTreeBuilder.
2476         (WebCore):
2477         * html/parser/CompactHTMLToken.h:
2478         (WebCore):
2479         (CompactHTMLToken):
2480
2481 2013-02-13  Andreas Kling  <akling@apple.com>
2482
2483         Remove Element::getAttributeItem() overload that returned a mutable Attribute*.
2484         <http://webkit.org/b/109756>
2485
2486         Reviewed by Antti Koivisto.
2487
2488         Remove this to prevent callers from accidentally causing elements to convert to UniqueElementData.
2489         There are two call sites (Attr and HTMLSelectElement) that legitimately need to mutate Attribute
2490         objects in-place, they now use Element::ensureUniqueElementData()->getAttributeItem() directly instead.
2491
2492         Small progression on Membuster3, mostly for peace of mind.
2493
2494         * dom/Attr.cpp:
2495         (WebCore::Attr::elementAttribute):
2496         * dom/Element.h:
2497         (Element):
2498         * html/HTMLInputElement.cpp:
2499         (WebCore::HTMLInputElement::updateType):
2500         * html/HTMLSelectElement.cpp:
2501         (WebCore::HTMLSelectElement::parseAttribute):
2502         * svg/SVGStyledElement.cpp:
2503         (WebCore::SVGStyledElement::getPresentationAttribute):
2504
2505 2013-02-13  Andreas Kling  <akling@apple.com>
2506
2507         Stronger ElementData pointer typing.
2508         <http://webkit.org/b/109752>
2509
2510         Reviewed by Antti Koivisto.
2511
2512         Use ShareableElementData/UniqueElementData pointers instead of generic ElementData pointers
2513         where possible. Moved some methods from base class into leaf classes that don't make sense
2514         for both classes.
2515
2516         * dom/DocumentSharedObjectPool.cpp:
2517         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
2518         (ShareableElementDataCacheEntry):
2519         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
2520         * dom/DocumentSharedObjectPool.h:
2521         (DocumentSharedObjectPool):
2522         * dom/Element.cpp:
2523         (WebCore::Element::parserSetAttributes):
2524         (WebCore::Element::setAttributeNode):
2525         (WebCore::Element::removeAttributeInternal):
2526         (WebCore::Element::cloneAttributesFromElement):
2527         (WebCore::Element::createUniqueElementData):
2528         (WebCore::ShareableElementData::createWithAttributes):
2529         (WebCore::UniqueElementData::create):
2530         (WebCore::ElementData::makeUniqueCopy):
2531         (WebCore::UniqueElementData::makeShareableCopy):
2532         * dom/Element.h:
2533         (ElementData):
2534         (ShareableElementData):
2535         (UniqueElementData):
2536         (Element):
2537         (WebCore::Element::ensureUniqueElementData):
2538         * dom/StyledElement.cpp:
2539         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2540
2541 2013-02-13  Antti Koivisto  <antti@apple.com>
2542
2543         Reschedule shared CFRunLoopTimer instead of reconstructing it
2544         https://bugs.webkit.org/show_bug.cgi?id=109765
2545
2546         Reviewed by Andreas Kling and Anders Carlsson.
2547
2548         Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers.
2549
2550         * platform/mac/SharedTimerMac.mm:
2551         (WebCore):
2552         (WebCore::PowerObserver::restartSharedTimer):
2553         (WebCore::sharedTimer):
2554         (WebCore::setSharedTimerFireInterval):
2555         (WebCore::stopSharedTimer):
2556
2557 2013-02-13  Emil A Eklund  <eae@chromium.org>
2558
2559         getComputedStyle returns truncated value for margin-right
2560         https://bugs.webkit.org/show_bug.cgi?id=109759
2561
2562         Reviewed by Tony Chang.
2563         
2564         Due to an unfortunate cast in CSSComputedStyleDeclaration::
2565         getPropertyCSSValue getComputedStyle returns truncated styles
2566         for margin-right in cases where it isn't set to a specific pixel
2567         value.
2568
2569         Test: fast/sub-pixel/computedstylemargin.html
2570
2571         * css/CSSComputedStyleDeclaration.cpp:
2572         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2573         Change type of temporary value variable to float to prevent loss of precision.
2574
2575 2013-02-13  Max Vujovic  <mvujovic@adobe.com>
2576
2577         [CSS Filters] Refactor filter outsets into a class
2578         https://bugs.webkit.org/show_bug.cgi?id=109330
2579
2580         Reviewed by Dean Jackson.
2581
2582         In filters related code, we're often operating on 4 ints representing the top, right,
2583         bottom, and left filter outsets. These outsets come from a filter like blur or drop-shadow.
2584         This patch packages those ints and their related operations into a class called
2585         IntRectExtent.
2586
2587         Here are some signs that we should make a class to hold those 4 ints:
2588         1) In RenderLayer.cpp, we have a expandRectForFilterOutsets function, which looks like
2589            feature envy.
2590         2) RenderStyle and other classes have methods like getFilterOutsets which set the 4 ints by
2591            reference. The calling code has to define 4 ints, which looks bloated.
2592         3) To fix bug 109098, we will need to check if filter outsets changed, which sounds like a
2593            nice job for an inequality operator. (https://bugs.webkit.org/show_bug.cgi?id=109098)
2594
2595         No new tests. No change in behavior. Just refactoring.
2596
2597         * GNUmakefile.list.am:
2598         * Target.pri:
2599         * WebCore.gypi:
2600         * WebCore.xcodeproj/project.pbxproj:
2601         * platform/graphics/IntRectExtent.h: Added.
2602         (WebCore):
2603         (IntRectExtent):
2604         (WebCore::IntRectExtent::IntRectExtent):
2605         (WebCore::IntRectExtent::top):
2606         (WebCore::IntRectExtent::setTop):
2607         (WebCore::IntRectExtent::right):
2608         (WebCore::IntRectExtent::setRight):
2609         (WebCore::IntRectExtent::bottom):
2610         (WebCore::IntRectExtent::setBottom):
2611         (WebCore::IntRectExtent::left):
2612         (WebCore::IntRectExtent::setLeft):
2613         (WebCore::IntRectExtent::expandRect):
2614         (WebCore::IntRectExtent::isZero):
2615         (WebCore::operator==):
2616         (WebCore::operator!=):
2617         (WebCore::operator+=):
2618         * platform/graphics/filters/FilterOperations.cpp:
2619         (WebCore::FilterOperations::outsets):
2620         * platform/graphics/filters/FilterOperations.h:
2621         (FilterOperations):
2622         * platform/graphics/texmap/TextureMapperLayer.cpp:
2623         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
2624         * rendering/FilterEffectRenderer.cpp:
2625         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
2626         (WebCore::FilterEffectRenderer::build):
2627         (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
2628         * rendering/FilterEffectRenderer.h:
2629         (FilterEffectRenderer):
2630         * rendering/RenderLayer.cpp:
2631         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
2632         (WebCore::transparencyClipBox):
2633         (WebCore::RenderLayer::calculateLayerBounds):
2634         * rendering/style/RenderStyle.h:
2635
2636 2013-02-13  Adam Barth  <abarth@webkit.org>
2637
2638         Factor HTMLTokenScanner out of HTMLPreloadScanner
2639         https://bugs.webkit.org/show_bug.cgi?id=109754
2640
2641         Reviewed by Eric Seidel.
2642
2643         This patch is just a mechanical separation of the per-token "scanning"
2644         logic from HTMLPreloadScanner into a separate class.
2645         HTMLPreloadScanner's job is now to keep track of the input stream and
2646         to pump the tokenizer.
2647
2648         This factorization class will let us use HTMLTokenScanner on the
2649         background thread (once we finish making it thread-safe). In a follow
2650         up patch, I'll move HTMLTokenScanner to its own file.
2651
2652         * html/parser/HTMLPreloadScanner.cpp:
2653         (WebCore::HTMLTokenScanner::HTMLTokenScanner):
2654         (WebCore::HTMLTokenScanner::~HTMLTokenScanner):
2655         (WebCore::HTMLTokenScanner::processPossibleTemplateTag):
2656         (WebCore::HTMLTokenScanner::processPossibleStyleTag):
2657         (WebCore::HTMLTokenScanner::processPossibleBaseTag):
2658         (WebCore::HTMLTokenScanner::scan):
2659         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
2660         (WebCore):
2661         (WebCore::HTMLPreloadScanner::~HTMLPreloadScanner):
2662         (WebCore::HTMLPreloadScanner::appendToEnd):
2663         (WebCore::HTMLPreloadScanner::scan):
2664         * html/parser/HTMLPreloadScanner.h:
2665         (HTMLTokenScanner):
2666         (WebCore::HTMLTokenScanner::setPredictedBaseElementURL):
2667         (HTMLPreloadScanner):
2668         (WebCore):
2669
2670 2013-02-13  Elliott Sprehn  <esprehn@chromium.org>
2671
2672         ASSERT(!renderer()->needsLayout()) when calling Element::focus() with generated content
2673         https://bugs.webkit.org/show_bug.cgi?id=109616
2674
2675         Reviewed by Julien Chaffraix.
2676
2677         Test: fast/css-generated-content/quote-layout-focus-crash.html
2678
2679         In some cases RenderQuote may mark itself and containing blocks as needing layout
2680         during a layout, but then one of it's containing blocks will mark itself as having
2681         finished layout so the RenderQuote and potentially some of it's ancestor renderers
2682         needLayout(), but the ancestors above those do not.
2683
2684         Until we have proper pre-layout tasks we should just walk the list of quotes
2685         right before layout and mark all their ancestors as needing layout if the quote
2686         needs layout.
2687
2688         * dom/Document.cpp:
2689         (WebCore::Document::updateLayout): Call markQuoteContainingBlocksForLayoutIfNeeded.
2690         (WebCore::Document::implicitClose): Call markQuoteContainingBlocksForLayoutIfNeeded.
2691         * rendering/RenderQuote.h:
2692         (WebCore::RenderQuote::next): Added.
2693         * rendering/RenderView.cpp:
2694         (WebCore::RenderView::markQuoteContainingBlocksForLayoutIfNeeded): Added.
2695         * rendering/RenderView.h:
2696         (RenderView):
2697
2698 2013-02-13  Jer Noble  <jer.noble@apple.com>
2699
2700         EME: MediaPlayer::keyNeede() should return a bool indicating whether an event listener was triggered.
2701         https://bugs.webkit.org/show_bug.cgi?id=109701
2702
2703         Reviewed by Eric Carlson.
2704
2705         Clients of MediaPlayer may need to do cleanup if calling keyNeeded()
2706         results in no event listener being triggered. Return a bool (like the
2707         v1 equivalent keyNeeded method) to indicate this.
2708
2709         * html/HTMLMediaElement.cpp:
2710         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
2711         * html/HTMLMediaElement.h:
2712         * platform/graphics/MediaPlayer.cpp:
2713         (WebCore::MediaPlayer::keyNeeded):
2714         * platform/graphics/MediaPlayer.h:
2715         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
2716
2717 2013-02-13  Abhishek Arya  <inferno@chromium.org>
2718
2719         ASSERTION FAILED: !object || object->isBox(), Bad cast in RenderBox::computeLogicalHeight
2720         https://bugs.webkit.org/show_bug.cgi?id=107748
2721
2722         Reviewed by Levi Weintraub.
2723
2724         Make sure that body renderer is not an inline-block display
2725         when determining that it stretches to viewport or when paginated
2726         content needs base height.
2727
2728         Test: fast/block/body-inline-block-crash.html
2729
2730         * rendering/RenderBox.cpp:
2731         (WebCore::RenderBox::computeLogicalHeight):
2732         * rendering/RenderBox.h:
2733         (WebCore::RenderBox::stretchesToViewport):
2734
2735 2013-02-13  Shawn Singh  <shawnsingh@chromium.org>
2736
2737         Fix debug assertion being triggered because we may access dirty normalFlowList.
2738         https://bugs.webkit.org/show_bug.cgi?id=109740
2739
2740         A debug assertion in RenderLayer.h is being hit when trying to
2741         access the normalFlowList when it is dirty.  This is caused by a
2742         new recursion that I added in RenderLayerBacking::hasVisibleNonCompositingDescendant(),
2743         but I overlooked the need to call updateLayerListsIfNeeded()
2744         recursively as well.
2745
2746         Reviewed by Simon Fraser.
2747
2748         No test, because there's no reliable way to test this (same as bug 85512).
2749
2750         * rendering/RenderLayerBacking.cpp:
2751         (WebCore::hasVisibleNonCompositingDescendant):
2752         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
2753
2754 2013-02-13  Antti Koivisto  <antti@apple.com>
2755
2756         Don't restart shared timer if both the current and the new fire time are in the past
2757         https://bugs.webkit.org/show_bug.cgi?id=109731
2758
2759         Reviewed by Andreas Kling.
2760
2761         In 40-50% of cases we reschedule the shared timer both the old and the new fire time have already passed. This can happen at least when rescheduling 
2762         a zero duration timer and when stopping a timer that was ready to fire.
2763
2764         We can skip rescheduling in this case, the shared timer will fire immediately anyway.
2765         
2766         Scheduling timers calls into platform layer and can be slow. This about halves the time under setSharedTimerFireInterval in PLT3
2767         for ~0.1% total CPU time reduction.
2768
2769         * platform/ThreadTimers.cpp:
2770         (WebCore::ThreadTimers::ThreadTimers):
2771         (WebCore::ThreadTimers::setSharedTimer):
2772         (WebCore::ThreadTimers::updateSharedTimer):
2773         (WebCore::ThreadTimers::sharedTimerFiredInternal):
2774         * platform/ThreadTimers.h:
2775         (ThreadTimers):
2776
2777 2013-02-13  Zan Dobersek  <zdobersek@igalia.com>
2778
2779         The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
2780         https://bugs.webkit.org/show_bug.cgi?id=109325
2781
2782         Reviewed by Anders Carlsson.
2783
2784         Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
2785         two methods as they're provided by the C++ standard library being used.
2786
2787         No new tests as there's no change in functionality.
2788
2789         * Modules/mediasource/MediaSource.cpp:
2790         (WebCore::MediaSource::setDuration):
2791         * Modules/webaudio/AudioBufferSourceNode.cpp:
2792         (WebCore::AudioBufferSourceNode::totalPitchRate):
2793         * Modules/webaudio/AudioParam.cpp:
2794         (WebCore::AudioParam::setValue):
2795         * Modules/webaudio/AudioParamTimeline.cpp:
2796         (WebCore::isValidNumber):
2797         * Modules/webaudio/PannerNode.cpp:
2798         (WebCore::fixNANs):
2799         * bindings/js/IDBBindingUtilities.cpp:
2800         (WebCore::createIDBKeyFromValue):
2801         * bindings/js/JSDataViewCustom.cpp:
2802         (WebCore::getDataViewMember):
2803         * bindings/js/JSGeolocationCustom.cpp:
2804         (WebCore::setTimeout):
2805         (WebCore::setMaximumAge):
2806         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2807         (WebCore::JSHTMLOptionsCollection::setLength):
2808         * bindings/js/JSWebKitPointCustom.cpp:
2809         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
2810         * bindings/scripts/CodeGeneratorJS.pm:
2811         (GenerateImplementation):
2812         (GenerateParametersCheck):
2813         * bindings/scripts/CodeGeneratorV8.pm:
2814         (GenerateParametersCheck):
2815         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2816         (WebCore::JSFloat64Array::getByIndex):
2817         * bindings/scripts/test/JS/JSTestObj.cpp:
2818         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
2819         * bindings/scripts/test/V8/V8TestObj.cpp:
2820         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
2821         * bindings/v8/IDBBindingUtilities.cpp:
2822         (WebCore::createIDBKeyFromValue):
2823         * bindings/v8/V8Binding.cpp:
2824         (WebCore::toInt32):
2825         (WebCore::toUInt32):
2826         * bindings/v8/custom/V8GeolocationCustom.cpp:
2827         (WebCore::createPositionOptions):
2828         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2829         (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
2830         * bindings/v8/custom/V8WebKitPointCustom.cpp:
2831         (WebCore::V8WebKitPoint::constructorCallbackCustom):
2832         * bridge/qt/qt_runtime.cpp:
2833         (JSC::Bindings::convertValueToQVariant):
2834         * css/WebKitCSSMatrix.cpp:
2835         (WebCore::WebKitCSSMatrix::translate):
2836         (WebCore::WebKitCSSMatrix::scale):
2837         (WebCore::WebKitCSSMatrix::rotate):
2838         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
2839         (WebCore::WebKitCSSMatrix::skewX):
2840         (WebCore::WebKitCSSMatrix::skewY):
2841         * html/HTMLMediaElement.cpp:
2842         (WebCore::HTMLMediaElement::percentLoaded):
2843         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2844         (WebCore::HTMLMediaElement::endedPlayback):
2845         * html/MediaController.cpp:
2846         (MediaController::duration):
2847         * html/canvas/WebGLRenderingContext.cpp:
2848         (WebCore):
2849         (WebCore::WebGLRenderingContext::clearColor):
2850         * html/track/TextTrack.cpp:
2851         (WebCore::TextTrack::addCue):
2852         * html/track/TextTrackCue.cpp:
2853         (WebCore::TextTrackCue::setStartTime):
2854         (WebCore::TextTrackCue::setEndTime):
2855         * page/DOMWindow.cpp:
2856         (WebCore::DOMWindow::adjustWindowRect):
2857         * page/WindowFeatures.cpp:
2858         (WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
2859         * platform/CalculationValue.cpp:
2860         (WebCore::CalculationValue::evaluate):
2861         * platform/Decimal.cpp:
2862         (WebCore::Decimal::fromDouble):
2863         * platform/Length.cpp:
2864         (WebCore::Length::nonNanCalculatedValue):
2865         * platform/audio/AudioResampler.cpp:
2866         (WebCore::AudioResampler::setRate):
2867         * platform/audio/DynamicsCompressorKernel.cpp:
2868         (WebCore::DynamicsCompressorKernel::process):
2869         * platform/audio/Reverb.cpp:
2870         (WebCore::calculateNormalizationScale):
2871         * platform/graphics/Font.cpp:
2872         (WebCore::Font::width):
2873         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2874         (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
2875         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
2876         (LoopBlinnMathUtils):
2877         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2878         (WebCore::MediaPlayerPrivateGStreamer::buffered):
2879         (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
2880         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2881         (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
2882         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
2883         (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
2884         * platform/graphics/transforms/TransformationMatrix.cpp:
2885         (WebCore::clampEdgeValue):
2886         (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
2887         * platform/network/ResourceResponseBase.cpp:
2888         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2889         * rendering/RenderMediaControlsChromium.cpp:
2890         (WebCore::paintMediaSlider):
2891         (WebCore::paintMediaVolumeSlider):
2892         * rendering/RenderThemeMac.mm:
2893         (WebCore::RenderThemeMac::paintMediaSliderTrack):
2894         * svg/SVGAnimationElement.cpp:
2895         (WebCore::SVGAnimationElement::beginElementAt):
2896         (WebCore::SVGAnimationElement::endElementAt):
2897         * svg/SVGSVGElement.cpp:
2898         (WebCore::SVGSVGElement::setCurrentTime):
2899         * svg/animation/SMILTime.h:
2900         (WebCore::SMILTime::SMILTime):
2901         * svg/animation/SVGSMILElement.cpp:
2902         (WebCore::SVGSMILElement::addBeginTime):
2903         (WebCore::SVGSMILElement::addEndTime):
2904         * xml/XPathFunctions.cpp:
2905         (WebCore::XPath::FunSubstring::evaluate):
2906         (WebCore::XPath::FunRound::round):
2907         * xml/XPathValue.cpp:
2908         (WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
2909         (WebCore::XPath::Value::toString):
2910
2911 2013-02-13  Eric Carlson  <eric.carlson@apple.com>
2912
2913         [Mac] Caption menu should have only one item selected
2914         https://bugs.webkit.org/show_bug.cgi?id=109730
2915
2916         Reviewed by Dean Jackson.
2917
2918         No new tests, media/track/track-user-preferences.html was modified to test the changes.
2919
2920         * CMakeLists.txt: Add CaptionUserPreferences.cpp.
2921         * GNUmakefile.list.am: Ditto.
2922         * Target.pri: Ditto.
2923         * WebCore.gypi: Ditto.
2924         * WebCore.vcproj/WebCore.vcproj: Ditto.
2925         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2926         * WebCore.xcodeproj/project.pbxproj: Ditto.
2927
2928         * html/HTMLMediaElement.cpp:
2929         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_processingPreferenceChange.
2930         (WebCore::HTMLMediaElement::configureTextTrackGroup): Only end up with one selected track when
2931             called because of a preferences change.
2932         (WebCore::HTMLMediaElement::captionPreferencesChanged): Call setClosedCaptionsVisible instead
2933             of calling markCaptionAndSubtitleTracksAsUnconfigured directly.
2934         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Process all tracks, 
2935             not just track elements.
2936         * html/HTMLMediaElement.h:
2937
2938         * page/CaptionUserPreferences.cpp: Added so the functionality can be tested in DRT.
2939         (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks):
2940         (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks):
2941         (WebCore::CaptionUserPreferences::setUserPrefersCaptions):
2942         (WebCore::CaptionUserPreferences::captionPreferencesChanged):
2943         (WebCore::CaptionUserPreferences::preferredLanguages):
2944         (WebCore::CaptionUserPreferences::setPreferredLanguage):
2945         (WebCore::CaptionUserPreferences::displayNameForTrack):
2946         * page/CaptionUserPreferences.h:
2947
2948         * page/CaptionUserPreferencesMac.h:
2949         * page/CaptionUserPreferencesMac.mm:
2950         (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Moved some logic
2951             to base class.
2952         (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Ditto.
2953
2954 2013-02-13  Hans Muller  <hmuller@adobe.com>
2955
2956         [CSS Exclusions] ExclusionPolygon reflex vertices should constrain the first fit location.
2957         https://bugs.webkit.org/show_bug.cgi?id=107568
2958
2959         Reviewed by Dirk Schulze.
2960
2961         The ExclusionPolygon::firstIncludedIntervalLogicalTop() method now includes offset edges
2962         for each of the polygon's reflex vertices. The motivation for this change is explained
2963         here: http://hansmuller-webkit.blogspot.com/2013/01/getting-to-point-reflex-vertices.html.
2964
2965         Test: fast/exclusions/shape-inside/shape-inside-first-fit-reflex.html
2966
2967         * rendering/ExclusionPolygon.cpp:
2968         (WebCore::isReflexVertex): Given three vertices that represent a pair of connected polygon edges, return true if the second vertex is a reflex vertex.
2969         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This method now includes offset edges for reflex vertices.
2970         * rendering/ExclusionPolygon.h:
2971         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge): Added a constructor for creating an OffsetPolygonEdge given a reflex vertex.
2972         (WebCore::OffsetPolygonEdge::edgeIndex): Changed this property from unsigned to int. Now using -1 to indicate that the offset edge doesn't correspond to a single polygon edge.
2973
2974 2013-02-13  Adam Barth  <abarth@webkit.org>
2975
2976         CSSPreloadScanner should not depend on HTMLToken
2977         https://bugs.webkit.org/show_bug.cgi?id=109742
2978
2979         Reviewed by Eric Seidel.
2980
2981         There's no need for the CSSPreloadScanner to depend on HTMLToken. On
2982         the background thread, we'll likely want to use a CompactHTMLToken for
2983         preload scanning, so this dependency is problematic. This patch also
2984         teaches the CSSPreloadScanner how to scan LChars.
2985
2986         * html/parser/CSSPreloadScanner.cpp:
2987         (WebCore::CSSPreloadScanner::~CSSPreloadScanner):
2988         (WebCore):
2989         (WebCore::CSSPreloadScanner::scan):
2990         * html/parser/CSSPreloadScanner.h:
2991         (CSSPreloadScanner):
2992         * html/parser/HTMLPreloadScanner.cpp:
2993         (WebCore::HTMLPreloadScanner::processToken):
2994
2995 2013-02-13  Julien Chaffraix  <jchaffraix@webkit.org>
2996
2997         [CSS Grid Layout] Adding or removing grid items doesn't properly recompute the track sizes
2998         https://bugs.webkit.org/show_bug.cgi?id=109100
2999
3000         Reviewed by Ojan Vafai.
3001
3002         Test: fast/css-grid-layout/grid-item-removal-track-breadth-update.html
3003
3004         The test uncovered several bugs in our implementation that is fixed as part
3005         of this change. They will be detailed below.
3006
3007         * rendering/RenderGrid.cpp:
3008         (WebCore::RenderGrid::logicalContentHeightForChild):
3009         Added this function to share the code between minContentForChild and maxContentForChild.
3010         Also forced a relayout in this case to avoid getting a wrong answer (e.g. the logical height
3011         constrained by the previous layout's grid breadth).
3012
3013         (WebCore::RenderGrid::minContentForChild):
3014         (WebCore::RenderGrid::maxContentForChild):
3015         Updated to use logicalContentHeightForChild.
3016
3017         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
3018         Updated to match the specification and set max breadth to current breadth per the specification.
3019         This made us over-grow some cases in the test.
3020
3021         (WebCore::RenderGrid::distributeSpaceToTracks):
3022         Updated to match the specification and use an extra variable to do the intermediate spreading. Also removed
3023         a now unneeded max. This fixes the case of multiple grid items in the same grid area that was completely broken.
3024
3025         (WebCore::RenderGrid::layoutGridItems):
3026         Added a FIXME about always relaying out content sized tracks' children.
3027
3028         * rendering/RenderGrid.h:
3029         Added logicalContentHeightForChild.
3030
3031 2013-02-13  Adam Barth  <abarth@webkit.org>
3032
3033         Clean up some style nits in HTMLPreloadScanner
3034         https://bugs.webkit.org/show_bug.cgi?id=109738
3035
3036         Reviewed by Tony Gentilcore.
3037
3038         This patch just fixes a few style nits I noticed when reading through
3039         the code.
3040
3041         * html/parser/HTMLPreloadScanner.cpp:
3042         (WebCore::StartTagScanner::StartTagScanner):
3043         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
3044         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
3045         * html/parser/HTMLResourcePreloader.cpp:
3046         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
3047         * html/parser/HTMLResourcePreloader.h:
3048         (PreloadRequest):
3049         (WebCore::PreloadRequest::PreloadRequest):
3050         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
3051
3052 2013-02-13  Sheriff Bot  <webkit.review.bot@gmail.com>
3053
3054         Unreviewed, rolling out r142747.
3055         http://trac.webkit.org/changeset/142747
3056         https://bugs.webkit.org/show_bug.cgi?id=109746
3057
3058         broke component build (Requested by alecf_gardening on
3059         #webkit).
3060
3061         * inspector/HeapGraphSerializer.cpp:
3062         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
3063         (WebCore::HeapGraphSerializer::pushUpdate):
3064         (WebCore::HeapGraphSerializer::reportNode):
3065         (WebCore::HeapGraphSerializer::toNodeId):
3066         (WebCore::HeapGraphSerializer::addRootNode):
3067         * inspector/HeapGraphSerializer.h:
3068         (WebCore):
3069         (HeapGraphSerializer):
3070         * inspector/InspectorMemoryAgent.cpp:
3071         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
3072
3073 2013-02-13  Levi Weintraub  <leviw@chromium.org>
3074
3075         Bidi-Isolated inlines can cause subsequent content to not be rendered
3076         https://bugs.webkit.org/show_bug.cgi?id=108137
3077
3078         Reviewed by Eric Seidel.
3079
3080         First step in fixing how inline isolates behave with collapsed spaces.
3081         webkit.org/b/109624 tracks the overarching issue.
3082
3083         Test: fast/text/content-following-inline-isolate-with-collapsed-whitespace.html
3084
3085         * rendering/InlineIterator.h:
3086         (WebCore::IsolateTracker::addFakeRunIfNecessary): If we enter an isolate while
3087         ignoring spaces, ensure we leave it considering them again. This can result in
3088         including spaces that should be ignored following the isolate on the line, but
3089         failing to do so results in those contents not being rendered at all.
3090
3091 2013-02-13  Andreas Kling  <akling@apple.com>
3092
3093         Better names for ElementAttributeData & subclasses.
3094         <http://webkit.org/b/109529>
3095
3096         Reviewed by Antti Koivisto.
3097
3098         - ElementAttributeData => ElementData
3099
3100             Because ElementAttributeData won't be a good name once we move some non-attribute related
3101             things to this structure.
3102
3103         - ImmutableElementAttributeData => ShareableElementData
3104
3105             These objects can be shared with other Elements that have the same attribute name/value pairs.
3106
3107         - MutableElementAttributeData => UniqueElementData
3108
3109             These objects contain data that is unique to a specific Element, and cannot be shared with
3110             other Elements. This is what's important about it, not that its underlying storage is mutable.
3111
3112         - attributeData() -> elementData()
3113         - updatedAttributeData() -> elementDataWithSynchronizedAttributes()
3114         - ensureUpdatedAttributeData() -> ensureElementDataWithSynchronizedAttributes()
3115         - mutableAttributeData() -> ensureUniqueElementData()
3116
3117             Ride-along renames. Much less vague than previous names IMO.
3118
3119         * css/StyleResolver.cpp:
3120         (WebCore::StyleResolver::canShareStyleWithControl):
3121         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
3122         * dom/Attr.cpp:
3123         (WebCore::Attr::elementAttribute):
3124         * dom/DocumentSharedObjectPool.cpp:
3125         (WebCore::ShareableElementDataCacheKey::ShareableElementDataCacheKey):
3126         (WebCore::ShareableElementDataCacheKey::operator!=):
3127         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
3128         (ShareableElementDataCacheEntry):
3129         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
3130         * dom/DocumentSharedObjectPool.h:
3131         (DocumentSharedObjectPool):
3132         * dom/Element.cpp:
3133         (WebCore::Element::detachAttribute):
3134         (WebCore::Element::removeAttribute):
3135         (WebCore::Element::attributes):
3136         (WebCore::Element::getAttribute):
3137         (WebCore::Element::setAttribute):
3138         (WebCore::Element::setSynchronizedLazyAttribute):
3139         (WebCore::Element::setAttributeInternal):
3140         (WebCore::Element::attributeChanged):
3141         (WebCore::Element::classAttributeChanged):
3142         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
3143         (WebCore::Element::parserSetAttributes):
3144         (WebCore::Element::hasAttributes):
3145         (WebCore::Element::hasEquivalentAttributes):
3146         (WebCore::Element::setAttributeNode):
3147         (WebCore::Element::removeAttributeNode):
3148         (WebCore::Element::removeAttributeInternal):
3149         (WebCore::Element::addAttributeInternal):
3150         (WebCore::Element::getAttributeNode):
3151         (WebCore::Element::getAttributeNodeNS):
3152         (WebCore::Element::hasAttribute):
3153         (WebCore::Element::hasAttributeNS):
3154         (WebCore::Element::computeInheritedLanguage):
3155         (WebCore::Element::getURLAttribute):
3156         (WebCore::Element::getNonEmptyURLAttribute):
3157         (WebCore::Element::cloneAttributesFromElement):
3158         (WebCore::Element::createUniqueElementData):
3159         (WebCore::Element::reportMemoryUsage):
3160         (WebCore::ElementData::deref):
3161         (WebCore::ElementData::ElementData):
3162         (WebCore::sizeForShareableElementDataWithAttributeCount):
3163         (WebCore::ElementData::createShareableWithAttributes):
3164         (WebCore::ElementData::createUnique):
3165         (WebCore::ShareableElementData::ShareableElementData):
3166         (WebCore::ShareableElementData::~ShareableElementData):
3167         (WebCore::UniqueElementData::UniqueElementData):
3168         (WebCore::ElementData::makeMutableCopy):
3169         (WebCore::ElementData::makeImmutableCopy):
3170         (WebCore::ElementData::setPresentationAttributeStyle):
3171         (WebCore::ElementData::addAttribute):
3172         (WebCore::ElementData::removeAttribute):
3173         (WebCore::ElementData::isEquivalent):
3174         (WebCore::ElementData::reportMemoryUsage):
3175         (WebCore::ElementData::getAttributeItemIndexSlowCase):
3176         * dom/Element.h:
3177         (ElementData):
3178         (WebCore::ElementData::isUnique):
3179         (ShareableElementData):
3180         (UniqueElementData):
3181         (WebCore::Element::getAttributeItemIndex):
3182         (WebCore::Element::elementData):
3183         (Element):
3184         (WebCore::Element::elementDataWithSynchronizedAttributes):
3185         (WebCore::Element::ensureElementDataWithSynchronizedAttributes):
3186         (WebCore::Element::fastHasAttribute):
3187         (WebCore::Element::fastGetAttribute):
3188         (WebCore::Element::hasAttributesWithoutUpdate):
3189         (WebCore::Element::idForStyleResolution):
3190         (WebCore::Element::classNames):
3191         (WebCore::Element::attributeCount):
3192         (WebCore::Element::attributeItem):
3193         (WebCore::Element::getAttributeItem):
3194         (WebCore::Element::updateInvalidAttributes):
3195         (WebCore::Element::hasID):
3196         (WebCore::Element::hasClass):
3197         (WebCore::Element::ensureUniqueElementData):
3198         (WebCore::ElementData::mutableAttributeVector):
3199         (WebCore::ElementData::immutableAttributeArray):
3200         (WebCore::ElementData::length):
3201         (WebCore::ElementData::presentationAttributeStyle):
3202         (WebCore::ElementData::getAttributeItem):
3203         (WebCore::ElementData::getAttributeItemIndex):
3204         (WebCore::ElementData::attributeItem):
3205         * dom/Node.cpp:
3206         (WebCore::Node::dumpStatistics):
3207         (WebCore::Node::compareDocumentPosition):
3208         * dom/StyledElement.cpp:
3209         (WebCore::StyledElement::updateStyleAttribute):
3210         (WebCore::StyledElement::ensureMutableInlineStyle):
3211         (WebCore::StyledElement::attributeChanged):
3212         (WebCore::StyledElement::inlineStyleCSSOMWrapper):
3213         (WebCore::StyledElement::setInlineStyleFromString):
3214         (WebCore::StyledElement::styleAttributeChanged):
3215         (WebCore::StyledElement::inlineStyleChanged):
3216         (WebCore::StyledElement::addSubresourceAttributeURLs):
3217         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
3218         * dom/StyledElement.h:
3219         (WebCore::StyledElement::inlineStyle):
3220         (WebCore::StyledElement::invalidateStyleAttribute):
3221         (WebCore::StyledElement::presentationAttributeStyle):
3222         * html/ClassList.cpp:
3223         (WebCore::ClassList::classNames):
3224         * html/HTMLInputElement.cpp:
3225         (WebCore::HTMLInputElement::updateType):
3226         * html/parser/HTMLConstructionSite.cpp:
3227         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3228         * svg/SVGElement.cpp:
3229         (WebCore::SVGElement::updateAnimatedSVGAttribute):
3230         * svg/SVGElement.h:
3231         (WebCore::SVGElement::invalidateSVGAttributes):
3232         * xml/parser/XMLDocumentParserQt.cpp:
3233         (WebCore::XMLDocumentParser::XMLDocumentParser):
3234
3235 2013-02-13  Christian Biesinger  <cbiesinger@chromium.org>
3236
3237         Crash when encountering <object style="resize:both;">
3238         https://bugs.webkit.org/show_bug.cgi?id=109728
3239
3240         See also https://code.google.com/p/chromium/issues/detail?id=175535
3241         This bug can be reproduced on
3242         http://dramalink.net/tudou.y/?xink=162601060
3243
3244         Reviewed by Eric Seidel.
3245
3246         Test: fast/css/resize-object-crash.html
3247
3248         * rendering/RenderWidget.cpp:
3249         (WebCore::RenderWidget::paint):
3250         Only call paintResizer() if we have a layer and canResize() is true
3251
3252 2013-02-13  Arko Saha  <arko@motorola.com>
3253
3254         [Microdata] HTMLPropertiesCollection code cleanup
3255         https://bugs.webkit.org/show_bug.cgi?id=109721
3256
3257         Reviewed by Ryosuke Niwa.
3258
3259         Removed forward declaration of DOMStringList class.
3260         Removed unused findRefElements() method declaration.
3261         Also Removed unused parameter Element* from updatePropertyCache() method.
3262
3263         No new test since no change in behavior.
3264
3265         * html/HTMLPropertiesCollection.cpp:
3266         (WebCore::HTMLPropertiesCollection::updateNameCache):
3267         * html/HTMLPropertiesCollection.h:
3268         (WebCore):
3269         (HTMLPropertiesCollection):
3270         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
3271
3272 2013-02-13  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3273
3274         [WebGL][EFL][GTK][Qt]Add support for OES_vertex_array_object.
3275         https://bugs.webkit.org/show_bug.cgi?id=109382
3276
3277         Reviewed by Kenneth Russell.
3278
3279         Covered by fast/canvas/webgl/oes-vertex-array-object.html
3280
3281         This patch adds support for using Vertex Array Object with OpenGl.
3282         The patch adds support for loading necessary opengl functions
3283         and support for checking GL_ARB_vertex_array_object. The support
3284         for OES_vertex_array_object is advertised if GL_ARB_vertex_array_object is
3285         supported.
3286
3287         * platform/graphics/OpenGLShims.cpp:
3288         (WebCore::initializeOpenGLShims):
3289         * platform/graphics/OpenGLShims.h:
3290         (_OpenGLFunctionTable):
3291         Added support for loading the necessary functions.
3292
3293         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3294         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
3295         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
3296         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
3297         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
3298         (WebCore::Extensions3DOpenGL::supportsExtension):
3299
3300         (WebCore):
3301         (WebCore::Extensions3DOpenGL::isVertexArrayObjectSupported):
3302         * platform/graphics/opengl/Extensions3DOpenGL.h:
3303         (Extensions3DOpenGL):
3304
3305 2013-02-13  Eberhard Graether  <egraether@google.com>
3306
3307         chromium: remove CompositorHUDFontAtlas
3308         https://bugs.webkit.org/show_bug.cgi?id=109328
3309
3310         Reviewed by James Robinson.
3311
3312         After switching the HudLayer to use skia's font rendering the
3313         CompositorHUDFontAtlas has become obsolete. This change removes
3314         this class and the related WebLayerTreeView API.
3315
3316         No new tests.
3317
3318         * WebCore.gypi:
3319         * platform/graphics/chromium/CompositorHUDFontAtlas.cpp: Removed.
3320         * platform/graphics/chromium/CompositorHUDFontAtlas.h: Removed.
3321
3322 2013-02-13  Dean Jackson  <dino@apple.com>
3323
3324         Small update to speech bubble for captions menu [Mac]
3325         https://bugs.webkit.org/show_bug.cgi?id=109641
3326
3327         Reviewed by Eric Carlson
3328
3329         Small adjustment to the embedded SVG that draws a speech bubble
3330         for the captions button. Remove a polygon that was so small
3331         it looked like a rendering error.
3332
3333         * css/mediaControlsQuickTime.css:
3334         (video::-webkit-media-controls-toggle-closed-captions-button):
3335
3336 2013-02-13  Dean Jackson  <dino@apple.com>
3337
3338         Clicking outside captions menu should dismiss it
3339         https://bugs.webkit.org/show_bug.cgi?id=109648
3340
3341         Reviewed by Eric Carlson.
3342
3343         Add a virtual override to the platform-specific
3344         defaultEventHandler to intercept any click in the controls,
3345         and hide the captions menu if it is showing.
3346
3347         Test: media/video-controls-captions-trackmenu-hide-on-click.html
3348
3349         * html/shadow/MediaControlsApple.cpp:
3350         (WebCore::MediaControlsApple::defaultEventHandler): Override from MediaControls. Hide
3351             captions menu if a click event comes in.
3352         * html/shadow/MediaControlsApple.h:
3353
3354 2013-02-13  Tommy Widenflycht  <tommyw@google.com>
3355
3356         MediaStream API: Use the source id when creating new tracks
3357         https://bugs.webkit.org/show_bug.cgi?id=109688
3358
3359         Reviewed by Adam Barth.
3360
3361         This patch reuses the ids from the source when creating tracks instead of creating a new one.
3362         This was requested by the chromium port to greatly simplify their implementation.
3363         In the longer run the API should be rewritten to only use tracks instead of sources.
3364
3365         Covered by existing tests.
3366
3367         * platform/chromium/support/WebMediaStream.cpp:
3368         (WebKit::WebMediaStream::audioTracks):
3369         (WebKit::WebMediaStream::videoTracks):
3370         (WebKit::WebMediaStream::initialize):
3371         (WebKit):
3372         * platform/chromium/support/WebMediaStreamTrack.cpp:
3373         (WebKit::WebMediaStreamTrack::initialize):
3374         (WebKit):
3375         * platform/mediastream/MediaStreamComponent.h:
3376         (WebCore::MediaStreamComponent::create):
3377         (MediaStreamComponent):
3378         (WebCore::MediaStreamComponent::MediaStreamComponent):
3379         (WebCore):
3380         * platform/mediastream/MediaStreamDescriptor.h:
3381         (WebCore::MediaStreamDescriptor::create):
3382         (MediaStreamDescriptor):
3383         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
3384
3385 2013-02-13  Eric Seidel  <eric@webkit.org>
3386
3387         Use fancy new Vector-based String constructors in the WebVTT parser
3388         https://bugs.webkit.org/show_bug.cgi?id=109619
3389
3390         Reviewed by Benjamin Poulain.
3391
3392         No change in behavior. Added some FIXMEs for future perf optimization.
3393
3394         * html/track/WebVTTParser.cpp:
3395         (WebCore::WebVTTParser::constructTreeFromToken):
3396
3397 2013-02-13  Morten Stenshorne  <mstensho@opera.com>
3398
3399         WebKit ignores column-rules wider than column-gap
3400         https://bugs.webkit.org/show_bug.cgi?id=15553
3401
3402         Paint column rules even if they are wider than the gap.
3403         Rules wider than the gap should just overlap with column contents.
3404
3405         Reviewed by Eric Seidel.
3406
3407         Test: fast/multicol/rule-thicker-than-gap.html
3408
3409         * rendering/RenderBlock.cpp:
3410         (WebCore::RenderBlock::paintColumnRules):
3411
3412 2013-02-13  Philip Rogers  <pdr@google.com>
3413
3414         Replace SVG bitmap cache with directly-rendered SVG
3415         https://bugs.webkit.org/show_bug.cgi?id=106159
3416
3417         Reviewed by Tim Horton.
3418
3419         This patch removes the caching of SVG bitmaps so SVG images are rendered directly. This
3420         enables WebKit to pass the IE Chalkboard demo in 10s on a Z620:
3421         http://ie.microsoft.com/testdrive/Performance/Chalkboard/
3422
3423         On a simple scaled SVG benchmark similar to the IE10 Chalkboard demo
3424         (http://philbit.com/SvgImagePerformance/viewport.html):
3425             without patch: ~20FPS
3426             with patch: ~55FPS
3427
3428         The bitmap SVG image cache had several shortcomings:
3429             - The bitmap cache prevented viewport rendering. (WK104693)
3430             - Bitmap memory usage was high. (WK106484)
3431             - Caching animating images was expensive.
3432
3433         Th