IndexedDB: simplify RecordIdentifier
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-19  Alec Flett  <alecflett@chromium.org>
2
3         IndexedDB: simplify RecordIdentifier
4         https://bugs.webkit.org/show_bug.cgi?id=102018
5
6         Reviewed by Tony Chang.
7
8         Make IDBBackingStore's RecordIdentifier be a simple
9         class, existing only as an inline or stack-based instance.
10         This makes much of the copy semantics more explicit, and
11         removes refcounting from an object that only ever had a refcount
12         of 1 or 2.
13
14         No new tests, just a refactor.
15
16         * Modules/indexeddb/IDBBackingStore.cpp:
17         (WebCore::IDBBackingStore::putRecord):
18         (WebCore::IDBBackingStore::deleteRecord):
19         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
20         (WebCore::IDBBackingStore::keyExistsInObjectStore):
21         (WebCore::IDBBackingStore::putIndexDataForRecord):
22         (WebCore::IDBBackingStore::deleteIndexDataForRecord):
23         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
24         (ObjectStoreCursorImpl):
25         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
26         (WebCore::IndexKeyCursorImpl::recordIdentifier):
27         (WebCore::IndexCursorImpl::recordIdentifier):
28         * Modules/indexeddb/IDBBackingStore.h:
29         (WebCore::IDBBackingStore::RecordIdentifier::RecordIdentifier):
30         (WebCore::IDBBackingStore::RecordIdentifier::isValid):
31         (WebCore::IDBBackingStore::RecordIdentifier::reset):
32         (RecordIdentifier):
33         (IDBBackingStore):
34         (WebCore::IDBBackingStore::Cursor::recordIdentifier):
35         (WebCore::IDBBackingStore::Cursor::Cursor):
36         (Cursor):
37         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
38         (WebCore):
39         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
40         (WebCore::IDBObjectStoreBackendImpl::putInternal):
41         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
42
43 2012-11-19  Alexander Shalamov  <alexander.shalamov@intel.com>
44
45         Improve ContentTypeParser, so that it could be used to validate mime type according to RFC
46         https://bugs.webkit.org/show_bug.cgi?id=100927
47
48         Reviewed by Alexey Proskuryakov.
49
50         This patch adds ParsedContentType class that represents contents of parsed
51         content type string. isValidContentType function could be used to check if
52         format of the content type string is acorrding to RFC 2616 section 4.2.
53
54         * CMakeLists.txt:
55         * GNUmakefile.list.am:
56         * Target.pri:
57         * WebCore.gypi:
58         * WebCore.xcodeproj/project.pbxproj:
59         * platform/network/MIMEHeader.cpp:
60         (WebCore::MIMEHeader::parseHeader):
61         * platform/network/ParsedContentType.cpp: Renamed from Source/WebCore/platform/network/ContentTypeParser.cpp.
62         (WebCore):
63         (EmptyParsedContentType):
64         (WebCore::EmptyParsedContentType::setContentType):
65         (WebCore::EmptyParsedContentType::setContentTypeParameter):
66         (WebCore::skipSpaces):
67         (WebCore::isTokenCharacter):
68         (WebCore::parseToken):
69         (WebCore::parseQuotedString):
70         (WebCore::substringForRange):
71         (WebCore::parseContentType):
72         (WebCore::isValidContentType):
73         (WebCore::ParsedContentType::ParsedContentType):
74         (WebCore::ParsedContentType::charset):
75         (WebCore::ParsedContentType::parameterValueForName):
76         (WebCore::ParsedContentType::parameterCount):
77         (WebCore::ParsedContentType::setContentType):
78         (WebCore::ParsedContentType::setContentTypeParameter):
79         * platform/network/ParsedContentType.h: Renamed from Source/WebCore/platform/network/ContentTypeParser.h.
80         (WebCore):
81         (ParsedContentType):
82         (WebCore::ParsedContentType::mimeType):
83
84 2012-11-19  Erik Arvidsson  <arv@chromium.org>
85
86         Update DOMException name: InvalidNodeTypeError
87         https://bugs.webkit.org/show_bug.cgi?id=102519
88
89         Reviewed by Kentaro Hara.
90
91         Patch 24 of 25 to update DOMException name to match the spec and Firefox.
92
93         No code uses DOMException InvalidNodeTypeError. We do use INVALID_NODE_TYPE_ERR for RangeException. See bug 102515.
94
95         * dom/DOMCoreException.cpp:
96
97 2012-11-19  Shinya Kawanaka  <shinyak@chromium.org>
98
99         Changing id, className, or attribute should invalidate distribution
100         https://bugs.webkit.org/show_bug.cgi?id=100738
101
102         Reviewed by Dimitri Glazkov.
103
104         When id, className, or attribute is changed, we might have to invalidate distribution.
105         However, we don't want to do useless invalidation. So we consult with the RuleFeatureSet of ElementShadow
106         to invalidate distribution only if necessary.
107
108         For the code that className is changed, we can share a lot of code between invalidating distribution and
109         invalidating style. So we made checkNeedsStyleInvalidationForClassChange a template method, and share it.
110
111         Since attributeChanged() is a hot method, we don't want to make it slow. So we made one function to determine
112         whether we have to invalidate distribution, and make it called only if necessary. Also, we've optimized
113         shadowOfParentForDistribution() by making isInsertionPoint() de-virtualed. We consuded NodeFlags (IsInsertionPointFlag)
114         for this purpose.
115
116         We've measured how this patch makes changing attribute slow. I've measured each code 3 times.
117         DOM/ModifyAttribute.html is a micro benchmark which changes attribute a lot of times. The result of this benchmark
118         will be the most affected by this patch. However, it's only 2% performance regression.
119
120         DOM/ModifyAttribute.html
121         Before this patch:
122                 median  stdev    min    max    [ms]
123           1st    494.0   3.36  490.0  502.0
124           2nd    503.5   3.44  497.0  512.0
125           3rd    494.0   3.48  488.0  499.0
126
127         After this patch:
128                 median  stdev  min      max    [ms]
129           1st    504.0   2.00  501.0  509.0
130           2nd    505.5   3.08  500.0  513.0
131           3rd    507.0   2.32  502.0  510.0
132
133         Tests: fast/dom/shadow/distribution-attribute-modified.html
134                fast/dom/shadow/distribution-className-modified.html
135                fast/dom/shadow/distribution-id-modified.html
136                fast/dom/shadow/reprojection-attribute-modified.html
137                fast/dom/shadow/reprojection-className-modified.html
138                fast/dom/shadow/reprojection-id-modified.html
139
140         * dom/Element.cpp:
141         (WebCore::Element::attributeChanged):
142         (WebCore::HasSelectorForClassStyleFunctor::HasSelectorForClassStyleFunctor):
143         (HasSelectorForClassStyleFunctor):
144         (WebCore::HasSelectorForClassStyleFunctor::operator()): Returns true if StyleResolver::hasSelectorForClass returns true.
145         (WebCore):
146         (WebCore::HasSelectorForClassDistributionFunctor::HasSelectorForClassDistributionFunctor):
147         (HasSelectorForClassDistributionFunctor):
148         (WebCore::HasSelectorForClassDistributionFunctor::operator()): Returns true if ElementShadow::hasSelectForClass returns true.
149         (WebCore::checkFunctorForClassChange):
150         (WebCore::checkNeedsStyleInvalidationForClassChange):
151         (WebCore::checkNeedsDistributionInvalidationForClassChange): Extracted the implementation to checkFunctorForClassChange.
152         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
153         * dom/Element.h:
154         (Element):
155         * dom/Node.h:
156         (WebCore::Node::isInsertionPoint):
157         * html/HTMLElement.h:
158         (HTMLElement):
159         * html/shadow/InsertionPoint.cpp:
160         (WebCore::InsertionPoint::InsertionPoint):
161         * html/shadow/InsertionPoint.h:
162         (InsertionPoint):
163         (WebCore::isInsertionPoint):
164         (WebCore::shadowOfParentForDistribution):
165         (WebCore::resolveReprojection):
166
167 2012-11-19  Nate Chapin  <japhet@chromium.org>
168
169         Move empty loading to DocumentLoader, simplify FrameLoader::init()
170         https://bugs.webkit.org/show_bug.cgi?id=101512
171
172         Reviewed by Adam Barth.
173
174         No new tests, though several outputs changed because we no longer send resource
175             load callbacks for empty loads.
176
177         * loader/DocumentLoader.cpp:
178         (WebCore::DocumentLoader::DocumentLoader):
179         (WebCore::DocumentLoader::~DocumentLoader):
180         (WebCore::DocumentLoader::finishedLoading):
181         (WebCore::DocumentLoader::clearMainResourceLoader):
182         (WebCore::DocumentLoader::isLoadingInAPISense):
183         (WebCore::DocumentLoader::isLoadingMainResource):
184         (WebCore::DocumentLoader::maybeLoadEmpty):
185         (WebCore):
186         (WebCore::DocumentLoader::startLoadingMainResource): Handle empty main resource
187              loads directly here.
188         * loader/DocumentLoader.h:
189         (DocumentLoader):
190         * loader/FrameLoader.cpp:
191         (WebCore::FrameLoader::FrameLoader): Initialize some variables whose values
192             were previously being reset in init(). Given that the FrameLoader is in
193             an inconsistent state before init() is called anyway, there doesn't seem
194             to be a disadvantage to just initializing them to their post-init() values.
195         (WebCore::FrameLoader::init): Just call startLoadingMainResource(), instead of
196             doing a bunch of direct calls to functions FrameLoader shouldn't know about.
197         * loader/FrameLoaderStateMachine.cpp:
198         (WebCore::FrameLoaderStateMachine::FrameLoaderStateMachine):
199         * loader/FrameLoaderStateMachine.h:
200         * loader/MainResourceLoader.cpp: Throughout, remove the concept of an empty load.
201         (WebCore::MainResourceLoader::loadNow): This only returned true when an empty
202             load got deferred, which won't happen now. Return void and always treat
203             as returning false.
204         * loader/MainResourceLoader.h:
205         (MainResourceLoader):
206
207 2012-11-19  Erik Arvidsson  <arv@chromium.org>
208
209         Update DOMException name: TimeoutError
210         https://bugs.webkit.org/show_bug.cgi?id=102513
211
212         Reviewed by Kentaro Hara.
213
214         Patch 23 of 25 to update DOMException name to match the spec and Firefox.
215
216         No code uses DOMException TimeoutError. We do use TIMEOUT_ERR for XMLHttpRequestException. See bug 102506.
217
218         * dom/DOMCoreException.cpp:
219
220 2012-11-19  Erik Arvidsson  <arv@chromium.org>
221
222         Update DOMException name: DataCloneError
223         https://bugs.webkit.org/show_bug.cgi?id=102521
224
225         Reviewed by Kentaro Hara.
226
227         Patch 25 of 25 to update DOMException name to match the spec and Firefox.
228
229         Updated existing tests.
230
231         * dom/DOMCoreException.cpp:
232
233 2012-11-19  Tom Hudson  <tomhudson@chromium.org>
234
235         Improve performance of RenderBoxModelObject::paintTranslucentBorderSides()
236         https://bugs.webkit.org/show_bug.cgi?id=98660
237
238         Reviewed by Simon Fraser.
239
240         Accumulate edges[i].shouldRender() in a flag field and pass that to paintBorderSides()
241         and paintTranslucentBorderSides() so that we don't do unnecessary work.
242
243         If we can avoid setting up and tearing down an unnecessary transparent layer we save
244         30ms on some mobile platforms.
245
246         * rendering/RenderBoxModelObject.h:
247         * rendering/RenderBoxModelObject.cpp:
248         (WebCore::RenderBoxModelObject::paintBorder):
249         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
250
251 2012-11-19  Hans Muller  <hmuller@adobe.com>
252
253         [CSS Exclusions] remove null exclusion shape check from ExclusionShape::createExclusionShape
254         https://bugs.webkit.org/show_bug.cgi?id=100765
255
256         Reviewed by Dirk Schulze.
257
258         ExclusionShape::createExclusionShape now ASSERTs that its basicShape argument
259         isn't null, since the caller is expected to ensure as much.  No new tests were
260         needed since this is a near-trivial cleanup.
261
262         * rendering/ExclusionShape.cpp:
263         (WebCore::ExclusionShape::createExclusionShape): This method no longer defends against a null basicShape argument by returning null.
264
265 2012-11-19  Sami Kyostila  <skyostil@chromium.org>
266
267         Use device scale factor instead of physical screen DPI for screen DPI
268         https://bugs.webkit.org/show_bug.cgi?id=101769
269
270         Reviewed by Adam Barth.
271
272         Media queries call WebCore::Screen::{horizontal,vertical}DPI() to determine
273         the dots per CSS inch[1] value for the "screen" media type. On Chromium these
274         functions currently return the physical screen DPI, which is wrong. To fix
275         this, we remove both of these functions entirely and make media queries use
276         the device scale factor multiplied by 96 on all ports.
277
278         [1] http://www.w3.org/TR/css3-mediaqueries/#resolution0
279
280         * page/Screen.cpp:
281         (WebCore::Screen::horizontalDPI):
282         (WebCore::Screen::verticalDPI):
283         * platform/PlatformScreen.h:
284         (WebCore):
285         * platform/blackberry/PlatformScreenBlackBerry.cpp:
286         * platform/chromium/PlatformScreenChromium.cpp:
287         * platform/efl/PlatformScreenEfl.cpp:
288         * platform/gtk/PlatformScreenGtk.cpp:
289         * platform/mac/PlatformScreenMac.mm:
290         * platform/qt/PlatformScreenQt.cpp:
291         * platform/win/PlatformScreenWin.cpp:
292         * platform/wx/ScreenWx.cpp:
293
294 2012-11-19  Julien Chaffraix  <jchaffraix@webkit.org>
295
296         Computed grid items' positions shouldn't be using Length
297         https://bugs.webkit.org/show_bug.cgi?id=102537
298
299         Reviewed by Tony Chang.
300
301         This change refactors how we store the grid items' position to use
302         a new type GridPosition. Length was a temporary type as it supported
303         'auto' | <integer> but it was starting to get more and more confusing
304         as we were implementing the layout routines.
305
306         No change in behavior.
307
308         * GNUmakefile.list.am:
309         * WebCore.gypi:
310         * WebCore.vcproj/WebCore.vcproj:
311         * WebCore.xcodeproj/project.pbxproj:
312         Added the new file to the build systems.
313
314         * rendering/style/RenderStyle.h:
315         Updated after the type change. Also made some getters
316         return a const reference instead of forcing a copy.
317
318         * rendering/style/StyleGridItemData.h:
319         (StyleGridItemData):
320         Ditto, also removed a comment about adding a new type.
321
322         * css/CSSComputedStyleDeclaration.cpp:
323         (WebCore::valueForGridPosition):
324         * css/StyleResolver.cpp:
325         (WebCore::createGridPosition):
326         (WebCore::StyleResolver::applyProperty):
327         * rendering/RenderGrid.cpp:
328         (WebCore::RenderGrid::resolveGridPosition):
329         Updated these sites after switching to GridPosition.
330
331         * rendering/RenderGrid.h:
332         Changed resolveGridPosition signature: it now takes a GridPosition.
333
334         * rendering/style/GridPosition.h: Added.
335         (WebCore::GridPosition::GridPosition):
336         Default constructor, creates an 'auto' position.
337
338         (WebCore::GridPosition::isPositive):
339         (WebCore::GridPosition::type):
340         (WebCore::GridPosition::isAuto):
341         (WebCore::GridPosition::setIntegerPosition):
342         (WebCore::GridPosition::integerPosition):
343         Helper functions.
344
345         (WebCore::GridPosition::operator==):
346         Required comparison operator for StyleGridItemData.
347
348 2012-11-19  Thiago Marcos P. Santos  <thiago.santos@intel.com>
349
350         Apply the resolved viewport rules
351         https://bugs.webkit.org/show_bug.cgi?id=95964
352
353         Reviewed by Kenneth Rohde Christiansen.
354
355         This patch implements the CSS Device Adaptation specification. The
356         WebKit implementation relies on the already implemented Viewport Meta
357         infrastructure to notify the browser of viewport changes.
358
359         The implementation was tests with success on the Qt and EFL ports, but
360         basically every port supporting Viewport Meta should be fine.
361
362         The usage of @-webkit-viewport inside media queries (more tests coming
363         to map all the corner cases) is currently limited when the media query
364         depends on the viewport dimensions itself. Defining the width and height
365         based on screen size will fail on ports reporting the screen
366         size as the size of the browser window instead of the device screen.
367
368         Tests: css3/device-adapt/opera/cascading-001.xhtml
369                css3/device-adapt/opera/cascading-002.xhtml
370                css3/device-adapt/opera/cascading-003.xhtml
371                css3/device-adapt/opera/cascading-004.xhtml
372                css3/device-adapt/opera/constrain-001.xhtml
373                css3/device-adapt/opera/constrain-002.xhtml
374                css3/device-adapt/opera/constrain-003.xhtml
375                css3/device-adapt/opera/constrain-004.xhtml
376                css3/device-adapt/opera/constrain-005.xhtml
377                css3/device-adapt/opera/constrain-006.xhtml
378                css3/device-adapt/opera/constrain-007.xhtml
379                css3/device-adapt/opera/constrain-008.xhtml
380                css3/device-adapt/opera/constrain-009.xhtml
381                css3/device-adapt/opera/constrain-010.xhtml
382                css3/device-adapt/opera/constrain-011.xhtml
383                css3/device-adapt/opera/constrain-012.xhtml
384                css3/device-adapt/opera/constrain-013.xhtml
385                css3/device-adapt/opera/constrain-014.xhtml
386                css3/device-adapt/opera/constrain-015.xhtml
387                css3/device-adapt/opera/constrain-016.xhtml
388                css3/device-adapt/opera/constrain-017.xhtml
389                css3/device-adapt/opera/constrain-020.xhtml
390                css3/device-adapt/opera/syntax-001.xhtml
391                css3/device-adapt/opera/syntax-002.xhtml
392                css3/device-adapt/opera/syntax-003.xhtml
393
394         * CMakeLists.txt:
395         * GNUmakefile.list.am:
396         * Target.pri:
397         * WebCore.gypi:
398         * WebCore.vcproj/WebCore.vcproj:
399         * WebCore.xcodeproj/project.pbxproj:
400         * css/CSSAllInOne.cpp:
401         * css/RuleSet.cpp:
402         (WebCore::RuleSet::addRulesFromSheet):
403         * css/StyleResolver.cpp:
404         (WebCore::StyleResolver::StyleResolver):
405         (WebCore::StyleResolver::appendAuthorStyleSheets):
406         (WebCore::StyleResolver::~StyleResolver):
407         * css/StyleResolver.h:
408         (StyleResolver):
409         (WebCore::StyleResolver::viewportStyleResolver):
410         * css/ViewportStyleResolver.cpp: Added.
411         (WebCore):
412         (WebCore::ViewportStyleResolver::ViewportStyleResolver):
413         (WebCore::ViewportStyleResolver::addViewportRule):
414         (WebCore::ViewportStyleResolver::clearDocument):
415         (WebCore::ViewportStyleResolver::resolve):
416         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
417         * css/ViewportStyleResolver.h: Added.
418         (WebCore):
419         (ViewportStyleResolver):
420         (WebCore::ViewportStyleResolver::create):
421         * dom/Document.h:
422         (WebCore::Document::setViewportArguments):
423         * dom/ViewportArguments.cpp:
424         (WebCore::compareIgnoringAuto):
425         (WebCore):
426         (WebCore::ViewportArguments::resolve):
427         * dom/ViewportArguments.h:
428         (ViewportAttributes):
429         (WebCore::ViewportArguments::ViewportArguments):
430         (ViewportArguments):
431         (WebCore::ViewportArguments::operator==):
432
433 2012-11-19  Erik Arvidsson  <arv@chromium.org>
434
435         Update DOMException name: SecurityError
436         https://bugs.webkit.org/show_bug.cgi?id=102437
437
438         Reviewed by Kentaro Hara.
439
440         Patch 18 of 25 to update DOMException name to match the spec and Firefox.
441
442         Updated existing tests.
443
444         * dom/DOMCoreException.cpp:
445
446 2012-11-19  Erik Arvidsson  <arv@chromium.org>
447
448         Update DOMException name: URLMismatchError
449         https://bugs.webkit.org/show_bug.cgi?id=102511
450
451         Reviewed by Kentaro Hara.
452
453         Patch 21 of 25 to update DOMException name to match the spec and Firefox.
454
455         Updated existing tests.
456
457         * dom/DOMCoreException.cpp:
458         (WebCore):
459
460 2012-11-19  Kihong Kwon  <kihong.kwon@samsung.com>
461
462         Add PROXIMITY_EVENTS feature
463         https://bugs.webkit.org/show_bug.cgi?id=102658
464
465         Reviewed by Kentaro Hara.
466
467         Add PROXIMITY_EVENTS feature to xcode project for WebCorei and GNU make.
468
469         No new tests. Just add a new feature.
470
471         * Configurations/FeatureDefines.xcconfig:
472         * GNUmakefile.features.am:
473
474 2012-11-19  Alexei Filippov  <alph@chromium.org>
475
476         Web Inspector: Dim a component's subitems' color in NMI snapshot
477         https://bugs.webkit.org/show_bug.cgi?id=102224
478
479         Reviewed by Yury Semikhatsky.
480
481         * inspector/front-end/NativeMemorySnapshotView.js:
482         (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
483         * inspector/front-end/nativeMemoryProfiler.css:
484         (.native-snapshot-view .data-grid .dimmed div.size-bar):
485
486 2012-11-19  Erik Arvidsson  <arv@chromium.org>
487
488         Update DOMException name: NetworkError
489         https://bugs.webkit.org/show_bug.cgi?id=102503
490
491         Reviewed by Kentaro Hara.
492
493         Patch 19 of 25 to update DOMException name to match the spec and Firefox.
494
495         No code uses DOMException NetworkError. We do use NETWORK_ERR for XMLHttpRequestException. See bug 102506.
496
497         * dom/DOMCoreException.cpp:
498
499 2012-11-19  Ilya Tikhonovsky  <loislo@chromium.org>
500
501         webaudio: clean-up. Replace AudioContext::m_document member with ContextDestructionObserver::scriptExecutionContext().
502         https://bugs.webkit.org/show_bug.cgi?id=102649
503
504         Reviewed by Adam Barth.
505
506         AudioContext uses m_document only as a pointer to ScriptExecutionContext.
507         It could be safely replaced with ContextDestructionObserver::m_scriptExecutionContext.
508         The lifetime of m_scriptExecutionContext is slightly different but it could be adjusted by m_isStopScheduled flag.
509
510         No new tests as there is no new functionality.
511
512         * Modules/webaudio/AudioBufferSourceNode.cpp:
513         (WebCore::AudioBufferSourceNode::looping):
514         (WebCore::AudioBufferSourceNode::setLooping):
515         * Modules/webaudio/AudioContext.cpp:
516         (WebCore::AudioContext::AudioContext):
517         (WebCore::AudioContext::stop):
518         (WebCore::AudioContext::scriptExecutionContext):
519         (WebCore::AudioContext::fireCompletionEvent):
520         (WebCore::AudioContext::reportMemoryUsage):
521         * Modules/webaudio/AudioContext.h:
522         (AudioContext):
523         * Modules/webaudio/ScriptProcessorNode.cpp:
524         (WebCore::ScriptProcessorNode::fireProcessEvent):
525         (WebCore::ScriptProcessorNode::scriptExecutionContext):
526
527 2012-11-19  Ilya Tikhonovsky  <loislo@chromium.org>
528
529         webaudio: leak: AudioContext objects are leaking. They retain 36mb of shared data.
530         https://bugs.webkit.org/show_bug.cgi?id=102356
531
532         Reviewed by Adam Barth.
533
534         A clean-up code was moved from uninitialize to clear method.
535         AudioContext marks itself as hasPendingActivity in method constructCommon and unmarks itself in method clear.
536         m_isStopScheduled filters out second ActiveDOMObject::stop call.
537         markForDeletion appends AudioNode pointer to m_nodesToDelete array if there is no active audio thread.
538         adoptRef was added in createOfflineContext method.
539         A guard was added into deleteMarkedNodes.
540
541         Test: inspector-protocol/nmi-webaudio-leak-test.html
542
543         * Modules/webaudio/AudioContext.cpp:
544         (WebCore::AudioContext::createOfflineContext):
545         (WebCore::AudioContext::AudioContext):
546         (WebCore::AudioContext::constructCommon):
547         (WebCore::AudioContext::~AudioContext):
548         (WebCore::AudioContext::clear):
549         (WebCore::AudioContext::uninitialize):
550         (WebCore::AudioContext::stopDispatch):
551         (WebCore::AudioContext::stop):
552         (WebCore::AudioContext::markForDeletion):
553         (WebCore::AudioContext::scheduleNodeDeletion):
554         (WebCore::AudioContext::deleteMarkedNodes):
555         * Modules/webaudio/AudioContext.h:
556         (AudioContext):
557         * bindings/v8/custom/V8AudioContextCustom.cpp:
558         (WebCore::V8AudioContext::constructorCallback):
559         * inspector/InspectorMemoryAgent.cpp:
560         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
561         * platform/PlatformMemoryInstrumentation.cpp:
562         (WebCore::PlatformMemoryInstrumentation::reportMemoryUsage):
563         (WebCore):
564         * platform/PlatformMemoryInstrumentation.h:
565         (PlatformMemoryInstrumentation):
566         (WebCore):
567
568 2012-11-19  Erik Arvidsson  <arv@chromium.org>
569
570         Update DOMException name: QuotaExceededError
571         https://bugs.webkit.org/show_bug.cgi?id=102512
572
573         Reviewed by Kentaro Hara.
574
575         Patch 22 of 25 to update DOMException name to match the spec and Firefox.
576
577         Updated existing tests.
578
579         * dom/DOMCoreException.cpp:
580
581 2012-11-19  Erik Arvidsson  <arv@chromium.org>
582
583         Update DOMException name: AbortError
584         https://bugs.webkit.org/show_bug.cgi?id=102508
585
586         Reviewed by Kentaro Hara.
587
588         Patch 20 of 25 to update DOMException name to match the spec and Firefox.
589
590         No code uses DOMException AbortError. We do use ABORT_ERR for XMLHttpRequestException. See bug 102506.
591
592         * dom/DOMCoreException.cpp:
593
594 2012-11-19  Kentaro Hara  <haraken@chromium.org>
595
596         Unreviewed, rolling out r135111.
597         http://trac.webkit.org/changeset/135111
598         https://bugs.webkit.org/show_bug.cgi?id=102356
599
600         The patch caused crashes in several layout tests
601
602         * Modules/webaudio/AudioContext.cpp:
603         (WebCore::AudioContext::createOfflineContext):
604         (WebCore::AudioContext::AudioContext):
605         (WebCore::AudioContext::constructCommon):
606         (WebCore::AudioContext::~AudioContext):
607         (WebCore::AudioContext::uninitialize):
608         (WebCore::AudioContext::uninitializeDispatch):
609         (WebCore::AudioContext::stop):
610         (WebCore::AudioContext::markForDeletion):
611         (WebCore::AudioContext::scheduleNodeDeletion):
612         (WebCore::AudioContext::deleteMarkedNodes):
613         * Modules/webaudio/AudioContext.h:
614         (AudioContext):
615         * bindings/v8/custom/V8AudioContextCustom.cpp:
616         (WebCore::V8AudioContext::constructorCallback):
617         * inspector/InspectorMemoryAgent.cpp:
618         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
619         * platform/PlatformMemoryInstrumentation.cpp:
620         (WebCore):
621         * platform/PlatformMemoryInstrumentation.h:
622
623 2012-11-19  Kentaro Hara  <haraken@chromium.org>
624
625         Unreviewed, rolling out r135116.
626         http://trac.webkit.org/changeset/135116
627         https://bugs.webkit.org/show_bug.cgi?id=102649
628
629         Revert this patch to revert r135111, which caused crashes in
630         several layout tests
631
632         * Modules/webaudio/AudioBufferSourceNode.cpp:
633         (WebCore::AudioBufferSourceNode::looping):
634         (WebCore::AudioBufferSourceNode::setLooping):
635         * Modules/webaudio/AudioContext.cpp:
636         (WebCore::AudioContext::AudioContext):
637         (WebCore::AudioContext::stop):
638         (WebCore::AudioContext::document):
639         (WebCore):
640         (WebCore::AudioContext::hasDocument):
641         (WebCore::AudioContext::scriptExecutionContext):
642         (WebCore::AudioContext::fireCompletionEvent):
643         (WebCore::AudioContext::reportMemoryUsage):
644         * Modules/webaudio/AudioContext.h:
645         (AudioContext):
646         * Modules/webaudio/ScriptProcessorNode.cpp:
647         (WebCore::ScriptProcessorNode::fireProcessEvent):
648         (WebCore::ScriptProcessorNode::scriptExecutionContext):
649
650 2012-11-19  Eugene Klyuchnikov  <eustas.bug@gmail.com>
651
652         Web Inspector: Refine JsDoc in DebuggerScriptMapping.js
653         https://bugs.webkit.org/show_bug.cgi?id=102673
654
655         Reviewed by Vsevolod Vlasov.
656
657         DebuggerScriptMapping calls public method "addScript" not defined
658         in SourceMapping interface.
659
660         To make things clear I've added ScriptSourceMapping interface that
661         extends SourceMapping interface by adding "addScript" method.
662
663         * inspector/front-end/SourceMapping.js: Added "ScriptSourceMapping".
664         * inspector/front-end/CompilerScriptMapping.js:
665         Updated "@implements" to ScriptSourceMapping.
666         * inspector/front-end/ResourceScriptMapping.js: Ditto.
667         * inspector/front-end/ScriptSnippetModel.js: Ditto.
668         * inspector/front-end/DebuggerScriptMapping.js: Updated signatures.
669         Removed useless code.
670
671 2012-11-19  Tim Horton  <timothy_horton@apple.com>
672
673         Unreviewed, untested build fix.
674
675         * bindings/scripts/IDLParser.pm:
676         (parseModule):
677
678 2012-11-19  Dongwoo Joshua Im  <dw.im@samsung.com>
679
680         [CSS3] Move CSSPropertyWebkitTextAlignLast into isValidKeywordPropertyAndValue function
681         https://bugs.webkit.org/show_bug.cgi?id=102303
682
683         Reviewed by Alexis Menard.
684
685         Move the part which check whether CSSPropertyWebkitTextAlignLast has available value
686         into the isValidKeywordPropertyAndValue function, like the same kind of properties.
687         This will help speed wise in JS.
688
689         No new functionality, no new tests.
690
691         * css/CSSParser.cpp:
692         (WebCore::isValidKeywordPropertyAndValue):
693         (WebCore::isKeywordPropertyID):
694         (WebCore::CSSParser::parseValue):
695
696 2012-11-19  Keishi Hattori  <keishi@webkit.org>
697
698         REGRESSION (r133565): Calendar picker isn't animating when changing month by pressing 't'
699         https://bugs.webkit.org/show_bug.cgi?id=102660
700
701         Reviewed by Kent Tamura.
702
703         The calendar picker used to animate when you press 't'.
704
705         No new tests.
706
707         * Resources/pagepopups/calendarPicker.js:
708         (DaysTable.prototype.selectRange):
709
710 2012-11-19  Kent Tamura  <tkent@chromium.org>
711
712         input.value="" should clear date/time input elements with partial values
713         https://bugs.webkit.org/show_bug.cgi?id=102645
714
715         Reviewed by Kentaro Hara.
716
717         Tests: fast/forms/date-multiple-fields/date-multiple-fields-value-set-empty.html
718                fast/forms/datetime-multiple-fields/datetime-multiple-fields-value-set-empty.html
719                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-value-set-empty.html
720                fast/forms/month-multiple-fields/month-multiple-fields-value-set-empty.html
721                fast/forms/time-multiple-fields/time-multiple-fields-value-set-empty.html
722                fast/forms/week-multiple-fields/week-multiple-fields-value-set-empty.html
723
724         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
725         (WebCore::BaseMultipleFieldsDateAndTimeInputType::setValue):
726         If the new value is an empty string and sub-fields has values, we should
727         update the UI value to the empty state.
728         * html/DateTimeFieldsState.h:
729         (WebCore::DateTimeFieldsState::hasAnyValue):
730         Added. It returns true if one or more sub-fields are not empty.
731
732 2012-11-19  Andrey Adaikin  <aandrey@chromium.org>
733
734         Web Inspector: [Canvas] if many canvases are being instrumented show the screenshot of the first one
735         https://bugs.webkit.org/show_bug.cgi?id=102522
736
737         Reviewed by Yury Semikhatsky.
738
739         When many canvases are being instrumented we'll want to show replay screenshots for each canvas.
740         Meanwhile, show the screenshot of the first one (instead of the last one), as it's likely to be the "main" canvas.
741         Drive-by: add more typification for the JS compiler.
742         Drive-by: create a new canvas for WebGL replay every time (similar to 2D replay) to avoid problems with resetting the context state.
743
744         * inspector/InjectedScriptCanvasModuleSource.js:
745         (.):
746
747 2012-11-19  Kentaro Hara  <haraken@chromium.org>
748
749         Remove IDLStructure.pm
750         https://bugs.webkit.org/show_bug.cgi?id=102642
751
752         Reviewed by Adam Barth.
753
754         Previously IDLStructure.pm was full of regular expressions to
755         parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm
756         just contains several data structures for the IDL parser. We can
757         move them to IDLParser.pm and thus remove IDLStructure.pm.
758
759         No tests. No change in generated code.
760
761         * CMakeLists.txt:
762         * DerivedSources.make:
763         * DerivedSources.pri:
764         * GNUmakefile.am:
765         * WebCore.gyp/WebCore.gyp:
766         * WebCore.vcproj/MigrateScripts:
767         * WebCore.vcproj/WebCore.vcproj:
768         * WebCore.xcodeproj/project.pbxproj:
769         * bindings/scripts/IDLParser.pm:
770         (Parse):
771         (parseInterface):
772         (parseException):
773         (parseConst):
774         (parseAttributeRest):
775         (parseOperationRest):
776         (parseOptionalOrRequiredArgument):
777         (parseExceptionField):
778         (parseInterfaceOld):
779         (parseExceptionOld):
780         (parseAttributeRestOld):
781         (applyExtendedAttributeList):
782         * bindings/scripts/IDLStructure.pm: Removed.
783
784 2012-11-19  Alexei Filippov  <alph@chromium.org>
785
786         Web Inspector: refine time and bytes output formatting
787         https://bugs.webkit.org/show_bug.cgi?id=102265
788
789         Reviewed by Yury Semikhatsky.
790
791         Add a space between number and unit, otherwise it's hard to read things like 88B.
792         Reduce a number of decimal digits in KB and MB formats. 1023.45KB seems to be too detailed.
793
794         * English.lproj/localizedStrings.js:
795         * inspector/front-end/CookiesTable.js:
796         (WebInspector.CookiesTable.prototype._createGridNode):
797         * inspector/front-end/UIUtils.js:
798         (Number.secondsToString):
799         (Number.bytesToString):
800
801 2012-11-19  Eugene Klyuchnikov  <eustas.bug@gmail.com>
802
803         Web Inspector: Timeline: DomContentLoaded event labeled incorrectly
804         https://bugs.webkit.org/show_bug.cgi?id=102383
805
806         Reviewed by Yury Semikhatsky.
807
808         Fixed string presentation of event.
809
810         * inspector/front-end/TimelinePresentationModel.js: Fixed string.
811
812 2012-11-19  Kentaro Hara  <haraken@chromium.org>
813
814         Remove IDLStructure.pm
815         https://bugs.webkit.org/show_bug.cgi?id=102642
816
817         Reviewed by Adam Barth.
818
819         Previously IDLStructure.pm was full of regular expressions to
820         parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm
821         just contains several data structures for the IDL parser. We can
822         move them to IDLParser.pm and thus remove IDLStructure.pm.
823
824         No tests. No change in generated code.
825
826         * CMakeLists.txt:
827         * DerivedSources.make:
828         * DerivedSources.pri:
829         * GNUmakefile.am:
830         * WebCore.gyp/WebCore.gyp:
831         * WebCore.vcproj/MigrateScripts:
832         * WebCore.vcproj/WebCore.vcproj:
833         * WebCore.xcodeproj/project.pbxproj:
834         * bindings/scripts/IDLParser.pm:
835         (Parse):
836         (parseInterface):
837         (parseException):
838         (parseConst):
839         (parseAttributeRest):
840         (parseOperationRest):
841         (parseOptionalOrRequiredArgument):
842         (parseExceptionField):
843         (parseInterfaceOld):
844         (parseExceptionOld):
845         (parseAttributeRestOld):
846         (applyExtendedAttributeList):
847         * bindings/scripts/IDLStructure.pm: Removed.
848
849 2012-11-19  Alexei Filippov  <alph@chromium.org>
850
851         Web Inspector: refine time and bytes output formatting
852         https://bugs.webkit.org/show_bug.cgi?id=102265
853
854         Reviewed by Yury Semikhatsky.
855
856         Add a space between number and unit, otherwise it's hard to read things like 88B.
857         Reduce a number of decimal digits in KB and MB formats. 1023.45KB seems to be too detailed.
858
859         * English.lproj/localizedStrings.js:
860         * inspector/front-end/CookiesTable.js:
861         (WebInspector.CookiesTable.prototype._createGridNode):
862         * inspector/front-end/UIUtils.js:
863         (Number.secondsToString):
864         (Number.bytesToString):
865
866 2012-11-19  Eugene Klyuchnikov  <eustas.bug@gmail.com>
867
868         Web Inspector: Timeline: DomContentLoaded event labeled incorrectly
869         https://bugs.webkit.org/show_bug.cgi?id=102383
870
871         Reviewed by Yury Semikhatsky.
872
873         Fixed string presentation of event.
874
875         * inspector/front-end/TimelinePresentationModel.js: Fixed string.
876
877 2012-11-19  Kentaro Hara  <haraken@chromium.org>
878
879         Unreviewed, rolling out r135114.
880         http://trac.webkit.org/changeset/135114
881         https://bugs.webkit.org/show_bug.cgi?id=102642
882
883         it broke Qt build
884
885         * CMakeLists.txt:
886         * DerivedSources.make:
887         * DerivedSources.pri:
888         * GNUmakefile.am:
889         * WebCore.gyp/WebCore.gyp:
890         * WebCore.vcproj/MigrateScripts:
891         * WebCore.vcproj/WebCore.vcproj:
892         * WebCore.xcodeproj/project.pbxproj:
893         * bindings/scripts/IDLParser.pm:
894         (Parse):
895         (parseInterface):
896         (parseException):
897         (parseConst):
898         (parseAttributeRest):
899         (parseOperationRest):
900         (parseOptionalOrRequiredArgument):
901         (parseExceptionField):
902         (parseInterfaceOld):
903         (parseExceptionOld):
904         (parseAttributeRestOld):
905         (applyExtendedAttributeList):
906         * bindings/scripts/IDLStructure.pm: Added.
907
908 2012-11-19  Vsevolod Vlasov  <vsevik@chromium.org>
909
910         Unreviewed inspector closure compilation fix.
911
912         * inspector/front-end/ObjectPropertiesSection.js:
913         * inspector/front-end/externs.js:
914
915 2012-11-18  Ilya Tikhonovsky  <loislo@chromium.org>
916
917         webaudio: clean-up. Replace AudioContext::m_document member with ContextDestructionObserver::scriptExecutionContext().
918         https://bugs.webkit.org/show_bug.cgi?id=102649
919
920         Reviewed by Adam Barth.
921
922         AudioContext uses m_document only as a pointer to ScriptExecutionContext.
923         It could be safely replaced with ContextDestructionObserver::m_scriptExecutionContext.
924         The lifetime of m_scriptExecutionContext is slightly different but it could be adjusted by m_isStopScheduled flag.
925
926         No new tests as there is no new functionality.
927
928         * Modules/webaudio/AudioBufferSourceNode.cpp:
929         (WebCore::AudioBufferSourceNode::looping):
930         (WebCore::AudioBufferSourceNode::setLooping):
931         * Modules/webaudio/AudioContext.cpp:
932         (WebCore::AudioContext::AudioContext):
933         (WebCore::AudioContext::stop):
934         (WebCore::AudioContext::fireCompletionEvent):
935         (WebCore::AudioContext::reportMemoryUsage):
936         * Modules/webaudio/AudioContext.h:
937         (WebCore::AudioContext::scriptExecutionContext):
938         (AudioContext):
939         * Modules/webaudio/ScriptProcessorNode.cpp:
940         (WebCore::ScriptProcessorNode::fireProcessEvent):
941         (WebCore::ScriptProcessorNode::scriptExecutionContext):
942
943 2012-11-18  Kentaro Hara  <haraken@chromium.org>
944
945         [V8] Remove unused variables from CodeGeneratorV8.pm
946         https://bugs.webkit.org/show_bug.cgi?id=102648
947
948         Reviewed by Adam Barth.
949
950         No tests. No change in generated code.
951
952         * bindings/scripts/CodeGeneratorV8.pm:
953         (GenerateInterface):
954         (GenerateHeader):
955         (GetInternalFields):
956         (GenerateNormalAttrGetter):
957         (GenerateSingleBatchedAttribute):
958         (GenerateImplementationCustomCall):
959         (GenerateFunctionCallString):
960         (CreateCustomSignature):
961         (GetContextEnableFunction):
962
963 2012-11-18  Kentaro Hara  <haraken@chromium.org>
964
965         Remove IDLStructure.pm
966         https://bugs.webkit.org/show_bug.cgi?id=102642
967
968         Reviewed by Adam Barth.
969
970         Previously IDLStructure.pm was full of regular expressions to
971         parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm
972         just contains several data structures for the IDL parser. We can
973         move them to IDLParser.pm and thus remove IDLStructure.pm.
974
975         No tests. No change in generated code.
976
977         * CMakeLists.txt:
978         * DerivedSources.make:
979         * DerivedSources.pri:
980         * GNUmakefile.am:
981         * WebCore.gyp/WebCore.gyp:
982         * WebCore.vcproj/MigrateScripts:
983         * WebCore.vcproj/WebCore.vcproj:
984         * WebCore.xcodeproj/project.pbxproj:
985         * bindings/scripts/IDLParser.pm:
986         (Parse):
987         (parseInterface):
988         (parseException):
989         (parseConst):
990         (parseAttributeRest):
991         (parseOperationRest):
992         (parseOptionalOrRequiredArgument):
993         (parseExceptionField):
994         (parseInterfaceOld):
995         (parseExceptionOld):
996         (parseAttributeRestOld):
997         (applyExtendedAttributeList):
998         * bindings/scripts/IDLStructure.pm: Removed.
999
1000 2012-11-18  Kentaro Hara  <haraken@chromium.org>
1001
1002         [V8] Make more use of $v8Interface in CodeGeneratorV8.pm
1003         https://bugs.webkit.org/show_bug.cgi?id=102639
1004
1005         Reviewed by Adam Barth.
1006
1007         We can replace hard-coded "V8${interfaceName}" with $v8Interface.
1008
1009         No tests. No change in generated code.
1010
1011         * bindings/scripts/CodeGeneratorV8.pm:
1012         (GenerateNormalAttrGetter):
1013         (GenerateNormalAttrSetter):
1014         (GenerateFunctionCallback):
1015         (GenerateNamedConstructorCallback):
1016         (GenerateImplementationIndexer):
1017         (GenerateImplementationNamedPropertyGetter):
1018         (GenerateImplementation):
1019
1020 2012-11-16  Ilya Tikhonovsky  <loislo@chromium.org>
1021
1022         webaudio: leak: AudioContext objects are leaking. They retain 36mb of shared data.
1023         https://bugs.webkit.org/show_bug.cgi?id=102356
1024
1025         Reviewed by Adam Barth.
1026
1027         A clean-up code was moved from uninitialize to clear method.
1028         AudioContext marks itself as hasPendingActivity in method constructCommon and unmarks itself in method clear.
1029         m_isStopScheduled filters out second ActiveDOMObject::stop call.
1030         markForDeletion appends AudioNode pointer to m_nodesToDelete array if there is no active audio thread.
1031         adoptRef was added in createOfflineContext method.
1032
1033         Test: inspector-protocol/nmi-webaudio-leak-test.html
1034
1035         * Modules/webaudio/AudioContext.cpp:
1036         (WebCore::AudioContext::createOfflineContext):
1037         (WebCore::AudioContext::AudioContext):
1038         (WebCore::AudioContext::constructCommon):
1039         (WebCore::AudioContext::~AudioContext):
1040         (WebCore::AudioContext::clear):
1041         (WebCore::AudioContext::uninitialize):
1042         (WebCore::AudioContext::stopDispatch):
1043         (WebCore::AudioContext::stop):
1044         (WebCore::AudioContext::markForDeletion):
1045         (WebCore::AudioContext::scheduleNodeDeletion):
1046         (WebCore::AudioContext::deleteMarkedNodes):
1047         * Modules/webaudio/AudioContext.h:
1048         (AudioContext):
1049         * bindings/v8/custom/V8AudioContextCustom.cpp:
1050         (WebCore::V8AudioContext::constructorCallback):
1051         * inspector/InspectorMemoryAgent.cpp:
1052         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1053         * platform/PlatformMemoryInstrumentation.cpp:
1054         (WebCore::PlatformMemoryInstrumentation::reportMemoryUsage):
1055         (WebCore):
1056         * platform/PlatformMemoryInstrumentation.h:
1057         (PlatformMemoryInstrumentation):
1058         (WebCore):
1059
1060 2012-11-18  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1061
1062         min/max/step support for calendar picker on datetime/datetime-local
1063         https://bugs.webkit.org/show_bug.cgi?id=102628
1064
1065         Reviewed by Kent Tamura.
1066
1067         Gray out dates with no allowed values on calendar picker for datetime/datetime-local
1068         when values are limited by min/max/step attributes.
1069
1070         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-datetime-with-step.html
1071
1072         * Resources/pagepopups/calendarPicker.js:
1073         (CalendarPicker.prototype._stepMismatch):
1074         Returns true iff there are any allowed values in the given day.
1075
1076 2012-11-18  Laszlo Gombos  <l.gombos@samsung.com>
1077
1078         Remove non-existent directories from the make system
1079         https://bugs.webkit.org/show_bug.cgi?id=102632
1080
1081         Reviewed by Adam Barth.
1082
1083         Remove (non-existent) symbian references from the exclude list in gyp project files.
1084
1085         No new tests as there is no new functionality.
1086
1087         * WebCore.gyp/WebCore.gyp:
1088
1089 2012-11-18  Patrick Gansterer  <paroga@webkit.org>
1090
1091         [WIN] Add a IMLangFontLinkType typedef
1092         https://bugs.webkit.org/show_bug.cgi?id=102584
1093
1094         Reviewed by Brent Fulgham.
1095
1096         Add a central typedef for IMLangFontLink(2) to get rid of a bunch of ifdefs.
1097
1098         * platform/graphics/FontCache.h:
1099         (WebCore):
1100         * platform/graphics/win/FontCacheWin.cpp:
1101         (WebCore::FontCache::getFontLinkInterface):
1102         (WebCore::getCJKCodePageMasks):
1103         (WebCore::createMLangFont):
1104         (WebCore::FontCache::getFontDataForCharacters):
1105         * platform/graphics/win/SimpleFontDataWin.cpp:
1106         (WebCore::SimpleFontData::containsCharacters):
1107         * platform/graphics/wince/FontCacheWinCE.cpp:
1108         (WebCore):
1109         (WebCore::FontCache::getFontLinkInterface):
1110         (WebCore::getCJKCodePageMasks):
1111         (WebCore::FontCache::getFontDataForCharacters):
1112         * platform/graphics/wince/FontPlatformData.cpp:
1113         (WebCore::FontFamilyCodePageInfo::codePages):
1114         (WebCore::FixedSizeFontData::create):
1115         * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
1116         (WebCore::GlyphPage::fill):
1117
1118 2012-11-18  Mike West  <mkwst@chromium.org>
1119
1120         Web Inspector: Remove unused ConsoleMessage constructor.
1121         https://bugs.webkit.org/show_bug.cgi?id=102590
1122
1123         Reviewed by Brent Fulgham.
1124
1125         We currently have a ConsoleMessage constructor that's unused. Let's
1126         kill it.
1127
1128         * inspector/ConsoleMessage.cpp:
1129         * inspector/ConsoleMessage.h:
1130         (ConsoleMessage):
1131             Removing an unused constructor variant.
1132
1133 2012-11-18  Andreas Kling  <akling@apple.com>
1134
1135         StyledElement: Make handling the "style" attribute a litte faster.
1136         <http://webkit.org/b/102623>
1137
1138         Reviewed by Ojan Vafai.
1139
1140         We know that "style" is never a presentation attribute, so avoid the virtual call to isPresentationAttribute()
1141         by hoisting the parseAttribute() logic up into attributeChanged().
1142         Did the same thing with Element::parseAttribute() for consistency.
1143
1144         Knocks ~0.6% of samples off of the DOM/CreateNodes performance test.
1145
1146         * dom/Element.cpp:
1147         (WebCore::Element::attributeChanged):
1148         * dom/Element.h:
1149         (WebCore::Element::parseAttribute):
1150         * dom/StyledElement.cpp:
1151         (WebCore::StyledElement::attributeChanged):
1152         * dom/StyledElement.h:
1153         (StyledElement):
1154
1155 2012-11-18  Laszlo Gombos  <l.gombos@samsung.com>
1156
1157         [CMake] Consolidate common input files
1158         https://bugs.webkit.org/show_bug.cgi?id=101632
1159
1160         Reviewed by Rob Buis.
1161
1162         Consolidate and sort the list of files, move common source files
1163         into CMakeLists.txt from the port specific files.
1164
1165         No new tests as there is no new functionality.
1166
1167         * CMakeLists.txt:
1168         * PlatformBlackBerry.cmake:
1169         * PlatformEfl.cmake:
1170         * PlatformWinCE.cmake:
1171
1172 2012-11-18  Andreas Kling  <akling@apple.com>
1173
1174         Tighten small SharedBuffers by reserving the exact amount of space needed.
1175         <http://webkit.org/b/102625>
1176
1177         Reviewed by Anders Carlsson.
1178
1179         When adding the first chunk to a small (<4096 bytes) SharedBuffer, reserve the exact
1180         amount of space needed instead of leaving it to Vector<char>::append().
1181
1182         1.86MB progression on Membuster3.
1183
1184         * platform/SharedBuffer.cpp:
1185         (WebCore::SharedBuffer::append):
1186
1187 2012-11-18  Ryosuke Niwa  <rniwa@webkit.org>
1188
1189         Make namedItem return a node list only in HTMLFormControlsCollection and HTMLOptionsCollection
1190         https://bugs.webkit.org/show_bug.cgi?id=101311
1191
1192         Reviewed by Darin Adler.
1193
1194         Introduce two new interfaces HTMLFormControlsCollection and HTMLOptionsCollection to be used by form.elements
1195         and select.options. These two interfaces have the named getter and namedItem that returns a live NodeList when
1196         there are multiple matches. Introducing these two interfaces allow us to make "regular" HTMLCollection's named
1197         getter and namedItem return exactly one node or null as specified in HTML5:
1198         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#collections-0
1199
1200         Unfortunately, HTMLOptionsCollection still has a bug that its named getter and namedItem returns
1201         a static NodeList instead of a live NodeList (DynamicNodeList) at the moment.
1202
1203         Also got rid of Document::objects since it's not exposed in IDL or called anywhere.
1204
1205         Test: fast/dom/html-collections-namedItem.html
1206
1207         * CMakeLists.txt:
1208         * DerivedSources.cpp:
1209         * DerivedSources.make:
1210         * DerivedSources.pri:
1211         * GNUmakefile.list.am:
1212         * Target.pri:
1213         * UseJSC.cmake:
1214         * UseV8.cmake:
1215         * WebCore.gypi:
1216         * WebCore.vcproj/WebCore.vcproj:
1217         * WebCore.xcodeproj/project.pbxproj:
1218         * bindings/js/JSBindingsAllInOne.cpp:
1219         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1220         (WebCore::getNamedItems):
1221         * bindings/js/JSHTMLCollectionCustom.cpp:
1222         (WebCore::JSHTMLCollection::nameGetter): Now returns exactly one node or null.
1223         (WebCore::toJS):
1224         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Added.
1225         (WebCore::getNamedItems): Returns RadioNodeList when there are multiple matches.
1226         (WebCore::JSHTMLFormControlsCollection::canGetItemsForName):
1227         (WebCore::JSHTMLFormControlsCollection::nameGetter):
1228         (WebCore::JSHTMLFormControlsCollection::namedItem):
1229         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1230         (WebCore::getNamedItems): Returns a static NodeList when there are multiple matches.
1231         This is a bug. It should be a live NodeList instead.
1232         (WebCore::JSHTMLOptionsCollection::canGetItemsForName):
1233         (WebCore::JSHTMLOptionsCollection::nameGetter):
1234         (WebCore::JSHTMLOptionsCollection::namedItem):
1235         * bindings/js/CodeGeneratorJS.pm: Include JSNode.js for all HTML*Collection interfaces for simplicity.
1236         * bindings/js/CodeGeneratorV8.pm: HTMLOptionsCollection now inherits from HTMLCollection. See
1237         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmloptionscollection
1238         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Pass in isolate when we can.
1239         (WebCore::getNamedItems): Added a comment about how we should be returning
1240         a HTMLCollection when there are multiple matches.
1241         (WebCore::getItem):
1242         (WebCore::V8HTMLAllCollection::namedPropertyGetter):
1243         (WebCore::V8HTMLAllCollection::namedItemCallback):
1244         * bindings/v8/custom/V8HTMLCollectionCustom.cpp: Now returns exactly one node or null.
1245         (WebCore::V8HTMLCollection::namedPropertyGetter):
1246         (WebCore::toV8):
1247         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Added.
1248         (WebCore::getNamedItems): Returns RadioNodeList when there are multiple matches.
1249         (WebCore::V8HTMLFormControlsCollection::namedPropertyGetter):
1250         (WebCore::V8HTMLFormControlsCollection::namedItemCallback):
1251         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1252         (WebCore::getNamedItems): Returns a static NodeList when there are multiple matches.
1253         This is a bug. It should be a live NodeList instead.
1254         (WebCore::V8HTMLOptionsCollection::namedPropertyGetter):
1255         (WebCore::V8HTMLOptionsCollection::namedItemCallback):
1256         * dom/Document.cpp: Removed Document::objects since it was not used anywhere.
1257         * dom/Document.h:
1258         (Document):
1259         * dom/Element.cpp:
1260         (WebCore::ElementRareData::ensureCachedHTMLCollection): form.elements should instantiate
1261         a HTMLFormControlsCollection instead of a HTMLCollection.
1262         * html/CollectionType.h:
1263         * html/HTMLCollection.idl: Removed [Custom] since namedItem is a regular function call now.
1264         * html/HTMLFieldSetElement.cpp:
1265         * html/HTMLFieldSetElement.h:
1266         * html/HTMLFormCollection.cpp: Removed.
1267         * html/HTMLFormCollection.h: Removed.
1268         * html/HTMLFormControlsCollection.cpp: Copied from Source/WebCore/html/HTMLFormCollection.cpp.
1269         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
1270         (WebCore::HTMLFormControlsCollection::create):
1271         (WebCore::HTMLFormControlsCollection::~HTMLFormControlsCollection):
1272         (WebCore::HTMLFormControlsCollection::formControlElements):
1273         (WebCore::HTMLFormControlsCollection::formImageElements):
1274         (WebCore::HTMLFormControlsCollection::virtualItemAfter):
1275         (WebCore::HTMLFormControlsCollection::namedItem):
1276         (WebCore::HTMLFormControlsCollection::updateNameCache):
1277         * html/HTMLFormControlsCollection.h: Copied from Source/WebCore/html/HTMLFormCollection.h.
1278         (HTMLFormControlsCollection):
1279         * html/HTMLFormControlsCollection.idl: Added.
1280         * html/HTMLFormElement.cpp:
1281         * html/HTMLFormElement.h:
1282         * html/HTMLOptionsCollection.idl:
1283
1284 2012-11-18  Kentaro Hara  <haraken@chromium.org>
1285
1286         [V8] Rename $className to $v8InterfaceName
1287         https://bugs.webkit.org/show_bug.cgi?id=102487
1288
1289         Reviewed by Adam Barth.
1290
1291         In CodeGeneratorV8.pm, $className is always "V8$interfaceName".
1292         We should rename $className to $v8InterfaceName. Also we can
1293         remove GetCallbackClassName().
1294
1295         No tests. No change in behavior.
1296
1297         * bindings/scripts/CodeGeneratorV8.pm:
1298         (GenerateHeader):
1299         (GetHeaderClassInclude):
1300         (GenerateDomainSafeFunctionGetter):
1301         (GenerateDomainSafeFunctionSetter):
1302         (GenerateParametersCheck):
1303         (GenerateImplementation):
1304         (GenerateHeaderContentHeader):
1305         (GenerateImplementationContentHeader):
1306         (GenerateCallbackHeader):
1307         (GenerateCallbackImplementation):
1308         (GenerateToV8Converters):
1309         (GetPassRefPtrType):
1310
1311 2012-11-18  Kentaro Hara  <haraken@chromium.org>
1312
1313         [V8] Remove GetTypeFromSignature() from CodeGeneratorV8.pm
1314         https://bugs.webkit.org/show_bug.cgi?id=102499
1315
1316         Reviewed by Adam Barth.
1317
1318         No tests. No change in behavior.
1319
1320         * bindings/scripts/CodeGeneratorV8.pm:
1321         (GenerateNormalAttrGetter):
1322         (GenerateNormalAttrSetter):
1323         (GenerateParametersCheckExpression):
1324         (GenerateParametersCheck):
1325         (GenerateFunctionCallString):
1326         (GetNativeTypeFromSignature):
1327         (TranslateParameter):
1328         (TypeCanFailConversion):
1329         (JSValueToNative):
1330         (NativeToJSValue):
1331
1332 2012-11-18  Kentaro Hara  <haraken@chromium.org>
1333
1334         Remove GenerateModule() from all code generators
1335         https://bugs.webkit.org/show_bug.cgi?id=102490
1336
1337         Reviewed by Adam Barth.
1338
1339         WebKit IDL files no longer support modules. The Web IDL spec
1340         no longer supports modules. We can remove it from code generators.
1341
1342         No tests. No change in behavior.
1343
1344         * bindings/scripts/CodeGenerator.pm:
1345         (ProcessDocument):
1346         * bindings/scripts/CodeGeneratorCPP.pm:
1347         * bindings/scripts/CodeGeneratorGObject.pm:
1348         * bindings/scripts/CodeGeneratorJS.pm:
1349         * bindings/scripts/CodeGeneratorObjC.pm:
1350         * bindings/scripts/CodeGeneratorV8.pm:
1351
1352 2012-11-18  Kentaro Hara  <haraken@chromium.org>
1353
1354         [V8] Get rid of unused functions and inline redundant functions in CodeGeneratorV8.pm
1355         https://bugs.webkit.org/show_bug.cgi?id=102497
1356
1357         Reviewed by Adam Barth.
1358
1359         No tests. No change in behavior.
1360
1361         * bindings/scripts/CodeGeneratorV8.pm:
1362         (GenerateDomainSafeFunctionGetter):
1363         (GenerateNormalAttrGetter):
1364         (GenerateFunctionCallString):
1365
1366 2012-11-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1367
1368         Unreviewed, rolling out r135074.
1369         http://trac.webkit.org/changeset/135074
1370         https://bugs.webkit.org/show_bug.cgi?id=102619
1371
1372         Made most layout tests crash. (Requested by rakuco on
1373         #webkit).
1374
1375         * PlatformEfl.cmake:
1376         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1377         (WebCore::GraphicsContext3D::create):
1378         (WebCore::GraphicsContext3D::GraphicsContext3D):
1379         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1380         (WebCore::GraphicsContext3D::makeContextCurrent):
1381         (WebCore::GraphicsContext3D::setContextLostCallback):
1382         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1383         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1384         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1385         (WebCore::GraphicsContext3DPrivate::createSurface):
1386         (WebCore::GraphicsContext3DPrivate::setCurrentGLContext):
1387         (WebCore::GraphicsContext3DPrivate::platformGraphicsContext3D):
1388         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
1389         (WebCore::GraphicsContext3DPrivate::createGraphicsSurfaces):
1390         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
1391         (WebCore::GraphicsContext3DPrivate::graphicsSurfaceToken):
1392         * platform/graphics/efl/GraphicsContext3DPrivate.h:
1393         (GraphicsContext3DPrivate):
1394         * platform/graphics/opengl/GLDefs.h: Removed.
1395         * platform/graphics/opengl/GLPlatformContext.cpp: Removed.
1396         * platform/graphics/opengl/GLPlatformContext.h: Removed.
1397         * platform/graphics/opengl/GLPlatformSurface.cpp: Removed.
1398         * platform/graphics/opengl/GLPlatformSurface.h: Removed.
1399         * platform/graphics/surfaces/glx/GLXContext.cpp: Removed.
1400         * platform/graphics/surfaces/glx/GLXContext.h: Removed.
1401         * platform/graphics/surfaces/glx/GLXSurface.cpp: Removed.
1402         * platform/graphics/surfaces/glx/GLXSurface.h: Removed.
1403
1404 2012-11-18  Antti Koivisto  <antti@apple.com>
1405
1406         REGRESSION(r129644): User StyleSheet not applying
1407         https://bugs.webkit.org/show_bug.cgi?id=102110
1408
1409         Reviewed by Andreas Kling.
1410
1411         Injected stylesheets added as UserStyleAuthorLevel fail to apply. r129644 implicitly assumed that
1412         such things don't exists but on Chromium addUserStyleSheet() confusingly uses them.
1413         
1414         The patch adds injected author stylesheets to DocumentStyleSheetCollection::activeStyleSheets().
1415         It also generally cleans up the code around injected and user stylesheets.
1416
1417         Tests: userscripts/user-script-and-stylesheet.html
1418                userscripts/user-stylesheet-invalidate.html
1419
1420         * css/StyleResolver.cpp:
1421         (WebCore::StyleResolver::StyleResolver):
1422         (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
1423         (WebCore::collectCSSOMWrappers):
1424         * css/StyleResolver.h:
1425         (StyleResolver):
1426         * dom/Document.cpp:
1427         (WebCore::Document::setCompatibilityMode):
1428         * dom/DocumentStyleSheetCollection.cpp:
1429         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
1430         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
1431         (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets):
1432         (WebCore):
1433         (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets):
1434         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
1435         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
1436         (WebCore::DocumentStyleSheetCollection::addUserSheet):
1437         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1438         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
1439         * dom/DocumentStyleSheetCollection.h:
1440         (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
1441         (DocumentStyleSheetCollection):
1442         * page/PageGroup.cpp:
1443         (WebCore::PageGroup::addUserStyleSheetToWorld):
1444         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
1445         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
1446         (WebCore::PageGroup::removeAllUserContent):
1447         (WebCore::PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames):
1448         * page/PageGroup.h:
1449         (PageGroup):
1450
1451 2012-11-18  Adam Barth  <abarth@webkit.org>
1452
1453         Unreviewed.
1454
1455         Update run-bindings-tests baselines after
1456         http://trac.webkit.org/changeset/135063
1457
1458         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1459         (JSTestActiveDOMObjectOwner):
1460         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1461         (JSTestCustomNamedGetterOwner):
1462         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1463         (JSTestEventConstructorOwner):
1464         * bindings/scripts/test/JS/JSTestEventTarget.h:
1465         (JSTestEventTargetOwner):
1466         * bindings/scripts/test/JS/JSTestException.h:
1467         (JSTestExceptionOwner):
1468         * bindings/scripts/test/JS/JSTestInterface.h:
1469         (JSTestInterfaceOwner):
1470         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1471         (JSTestMediaQueryListListenerOwner):
1472         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1473         (JSTestNamedConstructorOwner):
1474         * bindings/scripts/test/JS/JSTestObj.h:
1475         (JSTestObjOwner):
1476         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1477         (JSTestOverloadedConstructorsOwner):
1478         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1479         (JSTestSerializedScriptValueInterfaceOwner):
1480
1481 2012-11-18  Simon Fraser  <simon.fraser@apple.com>
1482
1483         Make convertToLayerCoords iterative, rather than recursive
1484         https://bugs.webkit.org/show_bug.cgi?id=102618
1485
1486         Reviewed by Antti Koivisto.
1487
1488         RenderLayer::convertToLayerCoords() is a hot function on profiles.
1489         Change it to be iterative, rather than recursive, so that the
1490         bulk of the function can be inlined.
1491         
1492         Was tested with assertions against the old code during development.
1493
1494         * rendering/RenderLayer.cpp:
1495         (WebCore::accumulateOffsetTowardsAncestor):
1496         (WebCore::RenderLayer::convertToLayerCoords):
1497
1498 2012-11-18  Andreas Kling  <akling@apple.com>
1499
1500         Inline the StyledElement constructor.
1501         <http://webkit.org/b/102615>
1502
1503         Reviewed by Antti Koivisto.
1504
1505         StyledElement sits between Element and HTMLElement in the inheritance chain, and both of those are inline. 
1506         Knocks ~0.4% of samples off of the DOM/CreateNodes performance test.
1507
1508         * dom/StyledElement.cpp:
1509         * dom/StyledElement.h:
1510         (WebCore::StyledElement::StyledElement):
1511
1512 2012-11-18  Andreas Kling  <akling@apple.com>
1513
1514         HTMLMediaElement: Skip unnecessary attribute lookup in parsing of "src" attribute.
1515         <http://webkit.org/b/102614>
1516
1517         Reviewed by Anders Carlsson.
1518
1519         When parsing the "src" attribute, we don't need to look it up with fastHasAttribute()
1520         to know if it's present. If it's not present, 'value' argument will be null.
1521
1522         * html/HTMLMediaElement.cpp:
1523         (WebCore::HTMLMediaElement::parseAttribute):
1524
1525 2012-11-18  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1526
1527         [EFL] Refactor GraphicsContext3DEFL.
1528         https://bugs.webkit.org/show_bug.cgi?id=101291.
1529
1530         Reviewed by Kenneth Rohde Christiansen.
1531
1532         GraphicsContext3DEfl creates GraphicsContext3DPrivate, which acts as its platform Layer.
1533         GraphicsContext3DPrivate needs to handle the following cases:
1534         1) To provide an off-screen buffer for accelerated composition.
1535         2) Render to a current context.
1536         3) To render directly to host window. (currently not supported.)
1537
1538         Before this patch Evas was used to provide us an off-screen context and buffer. GLX was used in
1539         the other supported case. Evas acts as a glue layer to provide us with appropriate
1540         GL bindings (OpenGL functions), GL context and drawable (surface/offscreenbuffer).
1541         However, primitive rendering is handled by TextureMapper and OpenGLShims is used to load the needed GL functions.
1542
1543         It would be for our advantage to be able to take in to use any optimisations/extensions
1544         provided by underlying drivers, specific to a platform (e.g. GLX_MESA_copy_sub_buffer etc.).
1545         This patch introduces an abstraction layer to make it easy to add support for any GL backend (GLX, EGL etc.)
1546         and do any platform specific optimizations as needed without complicating GraphicsContext3DPrivate class.
1547         Two new classes are added with this implementation, GLPlatformContext and GLPlatformSurface.
1548         GraphicsContext3DPrivate would create and own a GLPlatformContext and GLPlatformSurface.
1549
1550         GLPlatformContext encapsulates an OpenGL context hiding any platform specific management.
1551         It uses GL extension ARB_robustness (when available) to detect driver resets.
1552         It defines a simple interface for things that need to be handled by the context. Support
1553         for multi-threaded usage and shared context-group would be added later.
1554
1555         GLPlatformSurface encapsulates an OpenGL drawable hiding any platform specific management.
1556         It defines a simple interface for things that need to be handled by the surface.
1557         It creates an off-screen rendering area. Any GLPlatformContext (compatible with the surface)
1558         can be used to render into this off-screen area.
1559
1560         This patch also adds GLX implementation. To keep the patch to minimum EGL support would be added in another changeset.
1561
1562         * PlatformEfl.cmake:
1563         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1564         (WebCore::GraphicsContext3D::create):
1565         (WebCore::GraphicsContext3D::GraphicsContext3D):
1566         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1567         (WebCore::GraphicsContext3D::makeContextCurrent):
1568         (WebCore::GraphicsContext3D::setContextLostCallback):
1569         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1570         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1571         (GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1572         (GraphicsContext3DPrivate::releaseResources):
1573         (GraphicsContext3DPrivate::setContextLostCallback):
1574         (GraphicsContext3DPrivate::platformGraphicsContext3D):
1575         (GraphicsContext3DPrivate::makeContextCurrent):
1576         (GraphicsContext3DPrivate::createGraphicsSurfaces):
1577         (GraphicsContext3DPrivate::copyToGraphicsSurface):
1578         (GraphicsContext3DPrivate::graphicsSurfaceToken):
1579         * platform/graphics/efl/GraphicsContext3DPrivate.h:
1580         (GraphicsContext3DPrivate):
1581         * platform/graphics/opengl/GLDefs.h: Added.
1582         (WebCore):
1583         * platform/graphics/opengl/GLPlatformContext.cpp: Added.
1584         (WebCore):
1585         (WebCore::GLPlatformContext::createContext):
1586         (WebCore::GLPlatformContext::createOffScreenContext):
1587         (WebCore::GLPlatformContext::createCurrentContextWrapper):
1588         (WebCore::GLPlatformContext::GLPlatformContext):
1589         (WebCore::GLPlatformContext::~GLPlatformContext):
1590         (WebCore::GLPlatformContext::makeCurrent):
1591         (WebCore::GLPlatformContext::isValid):
1592         (WebCore::GLPlatformContext::releaseCurrent):
1593         (WebCore::GLPlatformContext::handle):
1594         (WebCore::GLPlatformContext::isCurrentContext):
1595         (WebCore::GLPlatformContext::initialize):
1596         (WebCore::GLPlatformContext::getCurrent):
1597         (WebCore::GLPlatformContext::platformMakeCurrent):
1598         (WebCore::GLPlatformContext::platformReleaseCurrent):
1599         (WebCore::GLPlatformContext::destroy):
1600         * platform/graphics/opengl/GLPlatformContext.h: Added.
1601         (WebCore):
1602         (GLPlatformContext):
1603         * platform/graphics/opengl/GLPlatformSurface.cpp: Added.
1604         (WebCore):
1605         (WebCore::GLPlatformSurface::createOffscreenSurface):
1606         (WebCore::GLPlatformSurface::createTransportSurface):
1607         (WebCore::GLPlatformSurface::GLPlatformSurface):
1608         (WebCore::GLPlatformSurface::~GLPlatformSurface):
1609         (WebCore::GLPlatformSurface::handle):
1610         (WebCore::GLPlatformSurface::geometry):
1611         (WebCore::GLPlatformSurface::sharedDisplay):
1612         (WebCore::GLPlatformSurface::configuration):
1613         (WebCore::GLPlatformSurface::swapBuffers):
1614         (WebCore::GLPlatformSurface::copyTexture):
1615         (WebCore::GLPlatformSurface::updateContents):
1616         (WebCore::GLPlatformSurface::setGeometry):
1617         (WebCore::GLPlatformSurface::destroy):
1618         * platform/graphics/opengl/GLPlatformSurface.h: Added.
1619         (WebCore):
1620         (GLPlatformSurface):
1621             GLXOffScreenContext creates an off-screen context. This is used when
1622             renderstyle is RenderOffscreen.
1623             It uses GL extension GLX_ARB_create_context (when available)
1624             to create a context else falls back to use glXCreateNewContext.
1625         * platform/graphics/surfaces/glx/GLXContext.cpp: Added.
1626         (WebCore):
1627         (WebCore::initializeARBExtensions):
1628         (WebCore::GLXOffScreenContext::GLXOffScreenContext):
1629         (WebCore::GLXOffScreenContext::initialize):
1630         (WebCore::GLXOffScreenContext::~GLXOffScreenContext):
1631         (WebCore::GLXOffScreenContext::isCurrentContext):
1632         (WebCore::GLXOffScreenContext::platformMakeCurrent):
1633         (WebCore::GLXOffScreenContext::platformReleaseCurrent):
1634         (WebCore::GLXOffScreenContext::freeResources):
1635         (WebCore::GLXOffScreenContext::destroy):
1636             GLXCurrentContextWrapper acts as a wrapper for current context.
1637             This is used when renderstyle is RenderToCurrentGLContext.
1638         * platform/graphics/surfaces/glx/GLXContext.h: Added.
1639         (WebCore):
1640         (GLXCurrentContextWrapper):
1641         (WebCore::GLXCurrentContextWrapper::GLXCurrentContextWrapper):
1642         (WebCore::GLXCurrentContextWrapper::~GLXCurrentContextWrapper):
1643         (GLXOffScreenContext):
1644         * platform/graphics/surfaces/glx/GLXSurface.cpp: Added.
1645         (WebCore):
1646         (WebCore::GLXSurface::GLXSurface):
1647         (WebCore::GLXSurface::~GLXSurface):
1648         (WebCore::GLXSurface::visualInfo):
1649         (WebCore::GLXSurface::xWindow):
1650         (WebCore::GLXSurface::pBufferConfiguration):
1651         (WebCore::GLXSurface::transportSurfaceConfiguration):
1652         (WebCore::GLXSurface::isXRenderExtensionSupported):
1653             GLXTransportSurface creates Window and uses it as an off-screen surface.
1654             Any GLContext that was created with respect to configuration can be used
1655             to render into this.
1656             This is used when contents of the buffer are to be provided to UI Process
1657             for display.
1658         (WebCore::GLXTransportSurface::GLXTransportSurface):
1659         (WebCore::GLXTransportSurface::~GLXTransportSurface):
1660         (WebCore::GLXTransportSurface::configuration):
1661         (WebCore::GLXTransportSurface::swapBuffers):
1662         (WebCore::GLXTransportSurface::setGeometry):
1663         (WebCore::GLXTransportSurface::initialize):
1664         (WebCore::GLXTransportSurface::destroy):
1665         (WebCore::GLXTransportSurface::freeResources):
1666            GLXPBuffer, Creates a GL surface (PBuffer) used for offscreen rendering.
1667            Any GLContext that was created with respect to configuration can be used
1668            to render into this.
1669         (WebCore::GLXPBuffer::GLXPBuffer):
1670         (WebCore::GLXPBuffer::~GLXPBuffer):
1671         (WebCore::GLXPBuffer::initialize):
1672         (WebCore::GLXPBuffer::configuration):
1673         (WebCore::GLXPBuffer::destroy):
1674         (WebCore::GLXPBuffer::freeResources):
1675         * platform/graphics/surfaces/glx/GLXSurface.h: Added.
1676         (WebCore):
1677             Creates X resources which are shared between surface and context.
1678         (SharedX11Resources):
1679         (WebCore::SharedX11Resources::create):
1680         (WebCore::SharedX11Resources::deref):
1681         (WebCore::SharedX11Resources::getXWindow):
1682         (WebCore::SharedX11Resources::display):
1683         (WebCore::SharedX11Resources::visualInfo):
1684         (WebCore::SharedX11Resources::createConfig):
1685         (WebCore::SharedX11Resources::pBufferContextConfig):
1686         (WebCore::SharedX11Resources::surfaceContextConfig):
1687         (WebCore::SharedX11Resources::isXRenderExtensionSupported):
1688         (WebCore::SharedX11Resources::SharedX11Resources):
1689         (WebCore::SharedX11Resources::~SharedX11Resources):
1690         (GLXSurface):
1691         (GLXTransportSurface):
1692         (GLXPBuffer):
1693
1694 2012-11-18  Andreas Kling  <akling@apple.com>
1695
1696         Element::parseAttribute() should take name & value as separate arguments.
1697         <http://webkit.org/b/102608>
1698
1699         Reviewed by Antti Koivisto.
1700
1701         Update the signature of parseAttribute() to take a QualifiedName/AtomicString combo instead
1702         of an Attribute. This lets us pass avoid refcount churn in Element::attributeChanged() since
1703         creating a temporary Attribute is no longer necessary.
1704
1705         This was surprisingly hot (~1%) on the DOM/CreateNodes performance test.
1706
1707         * bindings/js/ScriptEventListener.cpp:
1708         (WebCore::createAttributeEventListener):
1709         * bindings/js/ScriptEventListener.h:
1710         (WebCore):
1711         * bindings/v8/ScriptEventListener.cpp:
1712         (WebCore::createAttributeEventListener):
1713         * bindings/v8/ScriptEventListener.h:
1714         (WebCore):
1715         * dom/Element.cpp:
1716         (WebCore::Element::attributeChanged):
1717         (WebCore::Element::parseAttribute):
1718         * dom/Element.h:
1719         (Element):
1720         * dom/StyledElement.cpp:
1721         (WebCore::StyledElement::parseAttribute):
1722         * dom/StyledElement.h:
1723         (StyledElement):
1724         * html/HTMLAnchorElement.cpp:
1725         (WebCore::HTMLAnchorElement::parseAttribute):
1726         * html/HTMLAnchorElement.h:
1727         (HTMLAnchorElement):
1728         * html/HTMLAppletElement.cpp:
1729         (WebCore::HTMLAppletElement::parseAttribute):
1730         * html/HTMLAppletElement.h:
1731         (HTMLAppletElement):
1732         * html/HTMLAreaElement.cpp:
1733         (WebCore::HTMLAreaElement::parseAttribute):
1734         * html/HTMLAreaElement.h:
1735         (HTMLAreaElement):
1736         * html/HTMLBaseElement.cpp:
1737         (WebCore::HTMLBaseElement::parseAttribute):
1738         * html/HTMLBaseElement.h:
1739         (HTMLBaseElement):
1740         * html/HTMLBodyElement.cpp:
1741         (WebCore::HTMLBodyElement::parseAttribute):
1742         * html/HTMLBodyElement.h:
1743         (HTMLBodyElement):
1744         * html/HTMLButtonElement.cpp:
1745         (WebCore::HTMLButtonElement::parseAttribute):
1746         * html/HTMLButtonElement.h:
1747         * html/HTMLCanvasElement.cpp:
1748         (WebCore::HTMLCanvasElement::parseAttribute):
1749         * html/HTMLCanvasElement.h:
1750         (HTMLCanvasElement):
1751         * html/HTMLDetailsElement.cpp:
1752         (WebCore::HTMLDetailsElement::parseAttribute):
1753         * html/HTMLDetailsElement.h:
1754         (HTMLDetailsElement):
1755         * html/HTMLElement.cpp:
1756         (WebCore::HTMLElement::parseAttribute):
1757         (WebCore::HTMLElement::dirAttributeChanged):
1758         * html/HTMLElement.h:
1759         (HTMLElement):
1760         * html/HTMLEmbedElement.cpp:
1761         (WebCore::HTMLEmbedElement::parseAttribute):
1762         * html/HTMLEmbedElement.h:
1763         (HTMLEmbedElement):
1764         * html/HTMLFormControlElement.cpp:
1765         (WebCore::HTMLFormControlElement::parseAttribute):
1766         * html/HTMLFormControlElement.h:
1767         (HTMLFormControlElement):
1768         * html/HTMLFormElement.cpp:
1769         (WebCore::HTMLFormElement::parseAttribute):
1770         * html/HTMLFormElement.h:
1771         (HTMLFormElement):
1772         * html/HTMLFrameElement.cpp:
1773         (WebCore::HTMLFrameElement::parseAttribute):
1774         * html/HTMLFrameElement.h:
1775         (HTMLFrameElement):
1776         * html/HTMLFrameElementBase.cpp:
1777         (WebCore::HTMLFrameElementBase::parseAttribute):
1778         * html/HTMLFrameElementBase.h:
1779         (HTMLFrameElementBase):
1780         * html/HTMLFrameSetElement.cpp:
1781         (WebCore::HTMLFrameSetElement::parseAttribute):
1782         * html/HTMLFrameSetElement.h:
1783         (HTMLFrameSetElement):
1784         * html/HTMLIFrameElement.cpp:
1785         (WebCore::HTMLIFrameElement::parseAttribute):
1786         * html/HTMLIFrameElement.h:
1787         (HTMLIFrameElement):
1788         * html/HTMLImageElement.cpp:
1789         (WebCore::HTMLImageElement::parseAttribute):
1790         * html/HTMLImageElement.h:
1791         (HTMLImageElement):
1792         * html/HTMLInputElement.cpp:
1793         (WebCore::HTMLInputElement::parseAttribute):
1794         (WebCore::HTMLInputElement::parseMaxLengthAttribute):
1795         * html/HTMLInputElement.h:
1796         (HTMLInputElement):
1797         * html/HTMLKeygenElement.cpp:
1798         (WebCore::HTMLKeygenElement::parseAttribute):
1799         * html/HTMLKeygenElement.h:
1800         (HTMLKeygenElement):
1801         * html/HTMLLIElement.cpp:
1802         (WebCore::HTMLLIElement::parseAttribute):
1803         * html/HTMLLIElement.h:
1804         (HTMLLIElement):
1805         * html/HTMLLinkElement.cpp:
1806         (WebCore::HTMLLinkElement::parseAttribute):
1807         * html/HTMLLinkElement.h:
1808         (HTMLLinkElement):
1809         * html/HTMLMapElement.cpp:
1810         (WebCore::HTMLMapElement::parseAttribute):
1811         * html/HTMLMapElement.h:
1812         (HTMLMapElement):
1813         * html/HTMLMediaElement.cpp:
1814         (WebCore::HTMLMediaElement::parseAttribute):
1815         * html/HTMLMediaElement.h:
1816         * html/HTMLMetaElement.cpp:
1817         (WebCore::HTMLMetaElement::parseAttribute):
1818         * html/HTMLMetaElement.h:
1819         (HTMLMetaElement):
1820         * html/HTMLMeterElement.cpp:
1821         (WebCore::HTMLMeterElement::parseAttribute):
1822         * html/HTMLMeterElement.h:
1823         (HTMLMeterElement):
1824         * html/HTMLOListElement.cpp:
1825         (WebCore::HTMLOListElement::parseAttribute):
1826         * html/HTMLOListElement.h:
1827         (HTMLOListElement):
1828         * html/HTMLObjectElement.cpp:
1829         (WebCore::HTMLObjectElement::parseAttribute):
1830         * html/HTMLObjectElement.h:
1831         (HTMLObjectElement):
1832         * html/HTMLOptGroupElement.cpp:
1833         (WebCore::HTMLOptGroupElement::parseAttribute):
1834         * html/HTMLOptGroupElement.h:
1835         * html/HTMLOptionElement.cpp:
1836         (WebCore::HTMLOptionElement::parseAttribute):
1837         * html/HTMLOptionElement.h:
1838         (HTMLOptionElement):
1839         * html/HTMLOutputElement.cpp:
1840         (WebCore::HTMLOutputElement::parseAttribute):
1841         * html/HTMLOutputElement.h:
1842         (HTMLOutputElement):
1843         * html/HTMLProgressElement.cpp:
1844         (WebCore::HTMLProgressElement::parseAttribute):
1845         * html/HTMLProgressElement.h:
1846         * html/HTMLScriptElement.cpp:
1847         (WebCore::HTMLScriptElement::parseAttribute):
1848         * html/HTMLScriptElement.h:
1849         (HTMLScriptElement):
1850         * html/HTMLSelectElement.cpp:
1851         (WebCore::HTMLSelectElement::parseAttribute):
1852         (WebCore::HTMLSelectElement::parseMultipleAttribute):
1853         * html/HTMLSelectElement.h:
1854         * html/HTMLStyleElement.cpp:
1855         (WebCore::HTMLStyleElement::parseAttribute):
1856         * html/HTMLStyleElement.h:
1857         (HTMLStyleElement):
1858         * html/HTMLTableCellElement.cpp:
1859         (WebCore::HTMLTableCellElement::parseAttribute):
1860         * html/HTMLTableCellElement.h:
1861         (HTMLTableCellElement):
1862         * html/HTMLTableColElement.cpp:
1863         (WebCore::HTMLTableColElement::parseAttribute):
1864         * html/HTMLTableColElement.h:
1865         (HTMLTableColElement):
1866         * html/HTMLTableElement.cpp:
1867         (WebCore::HTMLTableElement::parseAttribute):
1868         * html/HTMLTableElement.h:
1869         (HTMLTableElement):
1870         * html/HTMLTextAreaElement.cpp:
1871         (WebCore::HTMLTextAreaElement::parseAttribute):
1872         * html/HTMLTextAreaElement.h:
1873         (HTMLTextAreaElement):
1874         * html/HTMLTextFormControlElement.cpp:
1875         (WebCore::HTMLTextFormControlElement::parseAttribute):
1876         * html/HTMLTextFormControlElement.h:
1877         (HTMLTextFormControlElement):
1878         * html/HTMLTrackElement.cpp:
1879         (WebCore::HTMLTrackElement::parseAttribute):
1880         * html/HTMLTrackElement.h:
1881         (HTMLTrackElement):
1882         * html/HTMLVideoElement.cpp:
1883         (WebCore::HTMLVideoElement::parseAttribute):
1884         * html/HTMLVideoElement.h:
1885         (HTMLVideoElement):
1886         * html/shadow/HTMLContentElement.cpp:
1887         (WebCore::HTMLContentElement::parseAttribute):
1888         * html/shadow/HTMLContentElement.h:
1889         (HTMLContentElement):
1890         * mathml/MathMLElement.cpp:
1891         (WebCore::MathMLElement::parseAttribute):
1892         * mathml/MathMLElement.h:
1893         (MathMLElement):
1894         * svg/SVGAElement.cpp:
1895         (WebCore::SVGAElement::parseAttribute):
1896         * svg/SVGAElement.h:
1897         (SVGAElement):
1898         * svg/SVGAnimateMotionElement.cpp:
1899         (WebCore::SVGAnimateMotionElement::parseAttribute):
1900         * svg/SVGAnimateMotionElement.h:
1901         (SVGAnimateMotionElement):
1902         * svg/SVGAnimateTransformElement.cpp:
1903         (WebCore::SVGAnimateTransformElement::parseAttribute):
1904         * svg/SVGAnimateTransformElement.h:
1905         (SVGAnimateTransformElement):
1906         * svg/SVGAnimationElement.cpp:
1907         (WebCore::SVGAnimationElement::parseAttribute):
1908         * svg/SVGAnimationElement.h:
1909         (SVGAnimationElement):
1910         * svg/SVGCircleElement.cpp:
1911         (WebCore::SVGCircleElement::parseAttribute):
1912         * svg/SVGCircleElement.h:
1913         (SVGCircleElement):
1914         * svg/SVGClipPathElement.cpp:
1915         (WebCore::SVGClipPathElement::parseAttribute):
1916         * svg/SVGClipPathElement.h:
1917         (SVGClipPathElement):
1918         * svg/SVGComponentTransferFunctionElement.cpp:
1919         (WebCore::SVGComponentTransferFunctionElement::parseAttribute):
1920         * svg/SVGComponentTransferFunctionElement.h:
1921         (SVGComponentTransferFunctionElement):
1922         * svg/SVGCursorElement.cpp:
1923         (WebCore::SVGCursorElement::parseAttribute):
1924         * svg/SVGCursorElement.h:
1925         (SVGCursorElement):
1926         * svg/SVGElement.cpp:
1927         (WebCore::SVGElement::reportAttributeParsingError):
1928         (WebCore::SVGElement::parseAttribute):
1929         * svg/SVGElement.h:
1930         (SVGElement):
1931         * svg/SVGEllipseElement.cpp:
1932         (WebCore::SVGEllipseElement::parseAttribute):
1933         * svg/SVGEllipseElement.h:
1934         (SVGEllipseElement):
1935         * svg/SVGExternalResourcesRequired.cpp:
1936         (WebCore::SVGExternalResourcesRequired::parseAttribute):
1937         * svg/SVGExternalResourcesRequired.h:
1938         (SVGExternalResourcesRequired):
1939         * svg/SVGFEBlendElement.cpp:
1940         (WebCore::SVGFEBlendElement::parseAttribute):
1941         * svg/SVGFEBlendElement.h:
1942         (SVGFEBlendElement):
1943         * svg/SVGFEColorMatrixElement.cpp:
1944         (WebCore::SVGFEColorMatrixElement::parseAttribute):
1945         * svg/SVGFEColorMatrixElement.h:
1946         (SVGFEColorMatrixElement):
1947         * svg/SVGFEComponentTransferElement.cpp:
1948         (WebCore::SVGFEComponentTransferElement::parseAttribute):
1949         * svg/SVGFEComponentTransferElement.h:
1950         (SVGFEComponentTransferElement):
1951         * svg/SVGFECompositeElement.cpp:
1952         (WebCore::SVGFECompositeElement::parseAttribute):
1953         * svg/SVGFECompositeElement.h:
1954         (SVGFECompositeElement):
1955         * svg/SVGFEConvolveMatrixElement.cpp:
1956         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
1957         * svg/SVGFEConvolveMatrixElement.h:
1958         (SVGFEConvolveMatrixElement):
1959         * svg/SVGFEDiffuseLightingElement.cpp:
1960         (WebCore::SVGFEDiffuseLightingElement::parseAttribute):
1961         * svg/SVGFEDiffuseLightingElement.h:
1962         (SVGFEDiffuseLightingElement):
1963         * svg/SVGFEDisplacementMapElement.cpp:
1964         (WebCore::SVGFEDisplacementMapElement::parseAttribute):
1965         * svg/SVGFEDisplacementMapElement.h:
1966         (SVGFEDisplacementMapElement):
1967         * svg/SVGFEDropShadowElement.cpp:
1968         (WebCore::SVGFEDropShadowElement::parseAttribute):
1969         * svg/SVGFEDropShadowElement.h:
1970         (SVGFEDropShadowElement):
1971         * svg/SVGFEGaussianBlurElement.cpp:
1972         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
1973         * svg/SVGFEGaussianBlurElement.h:
1974         (SVGFEGaussianBlurElement):
1975         * svg/SVGFEImageElement.cpp:
1976         (WebCore::SVGFEImageElement::parseAttribute):
1977         * svg/SVGFEImageElement.h:
1978         (SVGFEImageElement):
1979         * svg/SVGFELightElement.cpp:
1980         (WebCore::SVGFELightElement::parseAttribute):
1981         * svg/SVGFELightElement.h:
1982         (SVGFELightElement):
1983         * svg/SVGFEMergeNodeElement.cpp:
1984         (WebCore::SVGFEMergeNodeElement::parseAttribute):
1985         * svg/SVGFEMergeNodeElement.h:
1986         (SVGFEMergeNodeElement):
1987         * svg/SVGFEMorphologyElement.cpp:
1988         (WebCore::SVGFEMorphologyElement::parseAttribute):
1989         * svg/SVGFEMorphologyElement.h:
1990         (SVGFEMorphologyElement):
1991         * svg/SVGFEOffsetElement.cpp:
1992         (WebCore::SVGFEOffsetElement::parseAttribute):
1993         * svg/SVGFEOffsetElement.h:
1994         (SVGFEOffsetElement):
1995         * svg/SVGFESpecularLightingElement.cpp:
1996         (WebCore::SVGFESpecularLightingElement::parseAttribute):
1997         * svg/SVGFESpecularLightingElement.h:
1998         (SVGFESpecularLightingElement):
1999         * svg/SVGFETileElement.cpp:
2000         (WebCore::SVGFETileElement::parseAttribute):
2001         * svg/SVGFETileElement.h:
2002         (SVGFETileElement):
2003         * svg/SVGFETurbulenceElement.cpp:
2004         (WebCore::SVGFETurbulenceElement::parseAttribute):
2005         * svg/SVGFETurbulenceElement.h:
2006         (SVGFETurbulenceElement):
2007         * svg/SVGFilterElement.cpp:
2008         (WebCore::SVGFilterElement::parseAttribute):
2009         * svg/SVGFilterElement.h:
2010         (SVGFilterElement):
2011         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2012         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
2013         * svg/SVGFilterPrimitiveStandardAttributes.h:
2014         (SVGFilterPrimitiveStandardAttributes):
2015         * svg/SVGFitToViewBox.h:
2016         (WebCore::SVGFitToViewBox::parseAttribute):
2017         * svg/SVGFontFaceElement.cpp:
2018         (WebCore::SVGFontFaceElement::parseAttribute):
2019         * svg/SVGFontFaceElement.h:
2020         (SVGFontFaceElement):
2021         * svg/SVGFontFaceUriElement.cpp:
2022         (WebCore::SVGFontFaceUriElement::parseAttribute):
2023         * svg/SVGFontFaceUriElement.h:
2024         (SVGFontFaceUriElement):
2025         * svg/SVGForeignObjectElement.cpp:
2026         (WebCore::SVGForeignObjectElement::parseAttribute):
2027         * svg/SVGForeignObjectElement.h:
2028         (SVGForeignObjectElement):
2029         * svg/SVGGElement.cpp:
2030         (WebCore::SVGGElement::parseAttribute):
2031         * svg/SVGGElement.h:
2032         (SVGGElement):
2033         * svg/SVGGlyphElement.cpp:
2034         (WebCore::SVGGlyphElement::parseAttribute):
2035         * svg/SVGGlyphElement.h:
2036         (SVGGlyphElement):
2037         * svg/SVGGlyphRefElement.cpp:
2038         (WebCore::SVGGlyphRefElement::parseAttribute):
2039         * svg/SVGGlyphRefElement.h:
2040         * svg/SVGGradientElement.cpp:
2041         (WebCore::SVGGradientElement::parseAttribute):
2042         * svg/SVGGradientElement.h:
2043         * svg/SVGImageElement.cpp:
2044         (WebCore::SVGImageElement::parseAttribute):
2045         * svg/SVGImageElement.h:
2046         (SVGImageElement):
2047         * svg/SVGLangSpace.cpp:
2048         (WebCore::SVGLangSpace::parseAttribute):
2049         * svg/SVGLangSpace.h:
2050         (SVGLangSpace):
2051         * svg/SVGLineElement.cpp:
2052         (WebCore::SVGLineElement::parseAttribute):
2053         * svg/SVGLineElement.h:
2054         (SVGLineElement):
2055         * svg/SVGLinearGradientElement.cpp:
2056         (WebCore::SVGLinearGradientElement::parseAttribute):
2057         * svg/SVGLinearGradientElement.h:
2058         (SVGLinearGradientElement):
2059         * svg/SVGMPathElement.cpp:
2060         (WebCore::SVGMPathElement::parseAttribute):
2061         * svg/SVGMPathElement.h:
2062         (SVGMPathElement):
2063         * svg/SVGMarkerElement.cpp:
2064         (WebCore::SVGMarkerElement::parseAttribute):
2065         * svg/SVGMarkerElement.h:
2066         (SVGMarkerElement):
2067         * svg/SVGMaskElement.cpp:
2068         (WebCore::SVGMaskElement::parseAttribute):
2069         * svg/SVGMaskElement.h:
2070         (SVGMaskElement):
2071         * svg/SVGPathElement.cpp:
2072         (WebCore::SVGPathElement::parseAttribute):
2073         * svg/SVGPathElement.h:
2074         (SVGPathElement):
2075         * svg/SVGPatternElement.cpp:
2076         (WebCore::SVGPatternElement::parseAttribute):
2077         * svg/SVGPatternElement.h:
2078         (SVGPatternElement):
2079         * svg/SVGPolyElement.cpp:
2080         (WebCore::SVGPolyElement::parseAttribute):
2081         * svg/SVGPolyElement.h:
2082         (SVGPolyElement):
2083         * svg/SVGRadialGradientElement.cpp:
2084         (WebCore::SVGRadialGradientElement::parseAttribute):
2085         * svg/SVGRadialGradientElement.h:
2086         (SVGRadialGradientElement):
2087         * svg/SVGRectElement.cpp:
2088         (WebCore::SVGRectElement::parseAttribute):
2089         * svg/SVGRectElement.h:
2090         (SVGRectElement):
2091         * svg/SVGSVGElement.cpp:
2092         (WebCore::SVGSVGElement::parseAttribute):
2093         * svg/SVGSVGElement.h:
2094         (SVGSVGElement):
2095         * svg/SVGScriptElement.cpp:
2096         (WebCore::SVGScriptElement::parseAttribute):
2097         * svg/SVGScriptElement.h:
2098         (SVGScriptElement):
2099         * svg/SVGStopElement.cpp:
2100         (WebCore::SVGStopElement::parseAttribute):
2101         * svg/SVGStopElement.h:
2102         (SVGStopElement):
2103         * svg/SVGStyleElement.cpp:
2104         (WebCore::SVGStyleElement::parseAttribute):
2105         * svg/SVGStyleElement.h:
2106         (SVGStyleElement):
2107         * svg/SVGStyledElement.cpp:
2108         (WebCore::SVGStyledElement::parseAttribute):
2109         * svg/SVGStyledElement.h:
2110         (SVGStyledElement):
2111         * svg/SVGStyledTransformableElement.cpp:
2112         (WebCore::SVGStyledTransformableElement::parseAttribute):
2113         * svg/SVGStyledTransformableElement.h:
2114         (SVGStyledTransformableElement):
2115         * svg/SVGSymbolElement.cpp:
2116         (WebCore::SVGSymbolElement::parseAttribute):
2117         * svg/SVGSymbolElement.h:
2118         (SVGSymbolElement):
2119         * svg/SVGTRefElement.cpp:
2120         (WebCore::SVGTRefElement::parseAttribute):
2121         * svg/SVGTRefElement.h:
2122         (SVGTRefElement):
2123         * svg/SVGTests.cpp:
2124         (WebCore::SVGTests::parseAttribute):
2125         * svg/SVGTests.h:
2126         (SVGTests):
2127         * svg/SVGTextContentElement.cpp:
2128         (WebCore::SVGTextContentElement::parseAttribute):
2129         * svg/SVGTextContentElement.h:
2130         (SVGTextContentElement):
2131         * svg/SVGTextElement.cpp:
2132         (WebCore::SVGTextElement::parseAttribute):
2133         * svg/SVGTextElement.h:
2134         (SVGTextElement):
2135         * svg/SVGTextPathElement.cpp:
2136         (WebCore::SVGTextPathElement::parseAttribute):
2137         * svg/SVGTextPathElement.h:
2138         * svg/SVGTextPositioningElement.cpp:
2139         (WebCore::SVGTextPositioningElement::parseAttribute):
2140         * svg/SVGTextPositioningElement.h:
2141         (SVGTextPositioningElement):
2142         * svg/SVGURIReference.cpp:
2143         (WebCore::SVGURIReference::parseAttribute):
2144         * svg/SVGURIReference.h:
2145         (SVGURIReference):
2146         * svg/SVGUseElement.cpp:
2147         (WebCore::SVGUseElement::parseAttribute):
2148         * svg/SVGUseElement.h:
2149         (SVGUseElement):
2150         * svg/SVGViewElement.cpp:
2151         (WebCore::SVGViewElement::parseAttribute):
2152         * svg/SVGViewElement.h:
2153         (SVGViewElement):
2154         * svg/SVGZoomAndPan.h:
2155         (WebCore::SVGZoomAndPan::parseAttribute):
2156         * svg/animation/SVGSMILElement.cpp:
2157         (WebCore::SVGSMILElement::parseAttribute):
2158         * svg/animation/SVGSMILElement.h:
2159         (SVGSMILElement):
2160
2161 2012-11-18  Andreas Kling  <akling@apple.com>
2162
2163         StyleResolver: No need to compare "cellpadding" attributes when evaluating style sharing candidates.
2164         <http://webkit.org/b/102596>
2165
2166         Reviewed by Antti Koivisto.
2167
2168         Differences in the cellpadding attribute is caught by comparing additionalPresentationAttributeStyle()
2169         later on in canShareStyleWithElement() and we shouldn't waste time on comparing them.
2170
2171         * css/StyleResolver.cpp:
2172         (WebCore::haveIdenticalStyleAffectingAttributes):
2173
2174 2012-11-17  Jon Lee  <jonlee@apple.com>
2175
2176         Simulated mouse events should return an accurate offset
2177         https://bugs.webkit.org/show_bug.cgi?id=102606
2178         <rdar://problem/12725627>
2179
2180         Reviewed by Brady Eidson.
2181
2182         A check to see if the event is simulated prior to calculating the offset has existed for a
2183         long time (since at least r14916). Back then the check was needed because the offset was
2184         incrementally adjusted when the target was assigned (through
2185         MouseRelatedEvent::receivedTarget()).
2186
2187         Since r82225, we started calculating the offset only when needed, and calculating the offset
2188         from scratch rather than incrementally adjusting it. Since we recalculate from scratch,
2189         the isSimulated check is irrelevant, and we should remove it.
2190
2191         Tests are not possible because all uses of simulated mouse events provide no underlying
2192         event, so the offset is never recalculated.
2193
2194         * dom/MouseRelatedEvent.cpp:
2195         (WebCore::MouseRelatedEvent::computeRelativePosition): Remove the m_isSimulated check.
2196
2197 2012-11-17  Simon Fraser  <simon.fraser@apple.com>
2198
2199         Don't say there are dirty overlay scrollbars when they are clipped out
2200         https://bugs.webkit.org/show_bug.cgi?id=102609
2201
2202         Reviewed by Brady Eidson.
2203
2204         Painting overlay scrollbars involves a second painting pass over the entire
2205         RenderLayer subtree for a compositing layer, which can be very expensive.
2206         
2207         Avoid this when possible by detecting when overflow controls are not in
2208         the damage rect.
2209
2210         * rendering/RenderLayer.cpp:
2211         (WebCore::RenderLayer::rectForHorizontalScrollbar): Compute a local rect
2212         for the horizontal scrollbar.
2213         (WebCore::RenderLayer::rectForVerticalScrollbar): Compute a local rect
2214         for the vertical scrollbar.
2215         (WebCore::RenderLayer::positionOverflowControls): Use rectForHorizontalScrollbar()
2216         and rectForVerticalScrollbar().
2217         (WebCore::RenderLayer::overflowControlsIntersectRect): Return true if any
2218         of the present overflow controls intersect the given local rect.
2219         (WebCore::RenderLayer::paintOverflowControls): Bail if the damage rect
2220         doesn't intersect any of the overflow controls.
2221         * rendering/RenderLayer.h:
2222         (RenderLayer):
2223
2224 2012-11-17  Adam Barth  <abarth@webkit.org>
2225
2226         REGRESSION (r133633): ASSERTION FAILED: m_wrapper || !m_jsFunction
2227         https://bugs.webkit.org/show_bug.cgi?id=101428
2228
2229         Reviewed by Geoffrey Garen.
2230
2231         JSNodeOwner has some smarts that wrappers of subclasses of Node need to
2232         call during garbage collection. This patch teaches subclasses of Node
2233         to have their JSMumbleOwner objects inherit from JSNodeOwner.
2234
2235         The immediate benefit of this patch is that we correctly avoid
2236         collecting wrappers for HTMLAudioElements when they are reachable from
2237         the DOM.
2238
2239         * bindings/scripts/CodeGeneratorJS.pm:
2240         (GenerateHeader):
2241         (GenerateImplementation):
2242
2243 2012-11-17  Elliott Sprehn  <esprehn@chromium.org>
2244
2245         Expose JSObject::removeDirect and PrivateName to WebCore
2246         https://bugs.webkit.org/show_bug.cgi?id=102546
2247
2248         Reviewed by Geoffrey Garen.
2249
2250         Add forwarding header for PrivateName, so JSDependentRetained works.
2251
2252         No new tests, just adding headers.
2253
2254         * ForwardingHeaders/runtime/PrivateName.h: Added.
2255
2256 2012-11-17  Simon Fraser  <simon.fraser@apple.com>
2257
2258         Reduce the crazy number of parameters to RenderLayer clip-rect functions
2259         https://bugs.webkit.org/show_bug.cgi?id=102604
2260
2261         Reviewed by Dan Bernstein.
2262
2263         Many of the RenderLayer member functions related to clip rect computation
2264         took a long list of similar parameters. Gather these into a struct, ClipRectsContext,
2265         that we pass to these functions
2266         
2267         No functional changes.
2268
2269         * rendering/RenderLayer.cpp:
2270         (WebCore::RenderLayer::paintLayer):
2271         (WebCore::RenderLayer::paintLayerContents):
2272         (WebCore::RenderLayer::hitTestLayer):
2273         (WebCore::RenderLayer::updateClipRects):
2274         (WebCore::RenderLayer::calculateClipRects):
2275         (WebCore::RenderLayer::parentClipRects):
2276         (WebCore::RenderLayer::backgroundClipRect):
2277         (WebCore::RenderLayer::calculateRects):
2278         (WebCore::RenderLayer::childrenClipRect):
2279         (WebCore::RenderLayer::selfClipRect):
2280         (WebCore::RenderLayer::localClipRect):
2281         * rendering/RenderLayer.h:
2282         (WebCore::RenderLayer::ClipRectsContext::ClipRectsContext):
2283         (ClipRectsContext):
2284         (RenderLayer):
2285         (WebCore::RenderLayer::clipRects):
2286         * rendering/RenderLayerBacking.cpp:
2287         (WebCore::RenderLayerBacking::updateCompositedBounds):
2288         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2289         * rendering/RenderLayerCompositor.cpp:
2290         (WebCore::RenderLayerCompositor::addToOverlapMap):
2291         (WebCore::RenderLayerCompositor::clippedByAncestor):
2292         * rendering/RenderTreeAsText.cpp:
2293         (WebCore::writeLayers):
2294
2295 2012-11-17  Simon Fraser  <simon.fraser@apple.com>
2296
2297         Simplify bounds computation for the RenderView's layer
2298         https://bugs.webkit.org/show_bug.cgi?id=102597
2299
2300         Reviewed by Anders Carlsson.
2301
2302         Computing the bounds of the main layer (that of the RenderView) used to do
2303         a full RenderLayer walk, taking the union of the bounds of all the sublayers,
2304         which is very expensive on large pages.
2305         
2306         For the RenderView we can avoid that entirely and just use the RenderView's
2307         document rect. Since page scaling happens as a transform on this layer,
2308         we want the unscaled document rect.
2309
2310         * rendering/RenderLayer.cpp:
2311         (WebCore::RenderLayer::calculateLayerBounds):
2312
2313 2012-11-17  Eric Seidel  <eric@webkit.org>
2314
2315         Add ScriptWrappable to more WebCore classes which are commonly JS-wrapped
2316         https://bugs.webkit.org/show_bug.cgi?id=102601
2317
2318         Reviewed by Adam Barth.
2319
2320         From my investigations all of these classes exist only to be exposed
2321         to the web (via JavaScript) and are not used internally by WebCore.
2322         I beleive all of them always have wrappers.
2323         These were found using this code:
2324         https://bugs.webkit.org/show_bug.cgi?id=102539#c2
2325
2326         Geolocation -- navigator.geolocation
2327         WebKitCSSMatrix -- represent matrixes in JS through various APIs
2328         DOMStringMap, NamedNodeMap, NodeIterator, TreeWalker -- exclusively for the DOM API
2329         Blob, FileList - used by the File, Clipboard and XHR, also exclusively as API
2330         ValidityState -- formControl.validity
2331         CanvasRenderingContext -- canvas.getContext()
2332         DOMApplicationCache -- window.appcache
2333         Screen -- window.screen
2334         DOMMimeTypeArray -- navigator.mimetypes
2335         DOMPlugin -- navigator.plugins[0]
2336         DOMPluginArray -- navigator.plugins
2337
2338         * Modules/geolocation/Geolocation.h:
2339         * css/WebKitCSSMatrix.h:
2340         * dom/DOMStringMap.h:
2341         * dom/NamedNodeMap.h:
2342         * dom/NodeIterator.h:
2343         * dom/TreeWalker.h:
2344         * fileapi/Blob.h:
2345         * fileapi/FileList.h: (had to un-indent to make check-webkit-style happy)
2346         (FileList):
2347         (WebCore::FileList::create):
2348         (WebCore::FileList::length):
2349         (WebCore::FileList::isEmpty):
2350         (WebCore::FileList::clear):
2351         (WebCore::FileList::append):
2352         * html/ValidityState.h:
2353         * html/canvas/CanvasRenderingContext.h:
2354         * loader/appcache/DOMApplicationCache.h:
2355         * page/Screen.h:
2356         * platform/graphics/wince/MediaPlayerProxy.cpp:
2357         (WebCore::WebMediaPlayerProxy::initEngine): This code was wrong, fixed to use internal APIs.
2358         * plugins/DOMMimeTypeArray.h:
2359         * plugins/DOMPlugin.h:
2360         * plugins/DOMPluginArray.h:
2361
2362 2012-11-17  Alexandru Chiculita  <achicu@adobe.com>
2363
2364         [Texmap][CSS Shaders] Reuse the precompiled shader for custom filters in TextureMapperGL
2365         https://bugs.webkit.org/show_bug.cgi?id=101801
2366
2367         Reviewed by Noam Rosenthal.
2368
2369         Added a HashMap in TextureMapperGL to store the precompiled versions of the shaders.
2370         Also added a new API on TextureMapper that receives a notification when the shader
2371         is no longer needed.
2372
2373         No new tests, the code is tested by existing tests.
2374
2375         * platform/graphics/filters/CustomFilterOperation.h:
2376         (WebCore::CustomFilterOperation::setProgram):
2377         (CustomFilterOperation): Made the constructor protected, so that we can overwrite the class in WK2.
2378         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
2379         (WebCore::CustomFilterValidatedProgram::validatedProgramInfo):
2380         (WebCore):
2381         * platform/graphics/filters/CustomFilterValidatedProgram.h:
2382         (CustomFilterValidatedProgram):
2383         * platform/graphics/texmap/TextureMapper.h:
2384         (WebCore):
2385         (TextureMapper):
2386         (WebCore::TextureMapper::removeCachedCustomFilterProgram):
2387         Function to be called by the platform code, when the shader is no longer
2388         needed. This implementation is empty and overridden in TextureMapperGL.
2389         * platform/graphics/texmap/TextureMapperGL.cpp:
2390         (WebCore::TextureMapperGL::removeCachedCustomFilterProgram):
2391         Removes the compiled shader from the cache. This is called from WK2 when the compiled shader
2392         is no longer needed.
2393         (WebCore):
2394         (WebCore::TextureMapperGL::drawUsingCustomFilter): The first time it uses a new
2395         shader it will cache the compiled version until removeCachedCustomFilterProgram is called.
2396         * platform/graphics/texmap/TextureMapperGL.h:
2397         (WebCore):
2398         (TextureMapperGL):
2399
2400 2012-11-17  Brady Eidson  <beidson@apple.com>
2401
2402         Add an integer identifier field to AuthenticationChallengeBase.
2403         https://bugs.webkit.org/show_bug.cgi?id=102593
2404
2405         Reviewed by Darin Adler.
2406
2407         This is to support linking two different challenges that might not compare as equal but that 
2408         represent the same logical authentication challenge.
2409
2410         One example is in an IPC environment where the platform challenge can only exist in one process.
2411
2412         No new tests (Platform support, no effect in tested configs).
2413
2414         * WebCore.exp.in:
2415
2416         * platform/network/AuthenticationChallengeBase.cpp:
2417         (WebCore::AuthenticationChallengeBase::AuthenticationChallengeBase):
2418         * platform/network/AuthenticationChallengeBase.h:
2419         (WebCore::AuthenticationChallengeBase::identifier):
2420
2421         * platform/network/cf/AuthenticationChallenge.h:
2422         * platform/network/mac/AuthenticationMac.mm:
2423         (WebCore::generateUniqueIdentifier):
2424         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Generate a new unique identifier whenever
2425           constructing a challenge from an NSURLAuthenticationChallenge.
2426
2427         * platform/network/cf/AuthenticationCF.cpp:
2428         (WebCore::generateUniqueIdentifier):
2429         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Generate a new unique identifier whenever
2430           constructing a challenge from a CFURLAuthChallengeRef.
2431
2432         Implement the new constructor form for ports relevant to WebKit2:
2433         * platform/network/qt/AuthenticationChallenge.h:
2434         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2435         * platform/network/soup/AuthenticationChallenge.h:
2436         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2437         * platform/network/win/AuthenticationChallenge.h:
2438         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2439
2440 2012-11-17  Simon Fraser  <simon.fraser@apple.com>
2441
2442         Dump the tile cache extent in layout tests
2443         https://bugs.webkit.org/show_bug.cgi?id=102600
2444
2445         Reviewed by Anders Carlsson.
2446
2447         When dumping tiled layer stats in layout tests, also dump the extent
2448         of the tile grid. This will allow us to detect issues related
2449         to zooming, which is not possible with the existing tile coverage rect,
2450         which is dumped in layer (not tile) coordinates.
2451
2452         * platform/graphics/TiledBacking.h: Added tileGridExtent().
2453         * platform/graphics/ca/GraphicsLayerCA.cpp:
2454         (WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump the tile grid extent.
2455         * platform/graphics/ca/mac/TileCache.h: tileCoverageRect() should be OVERRIDE.
2456         * platform/graphics/ca/mac/TileCache.mm:
2457         (WebCore::TileCache::getTileIndexRangeForRect):
2458         (WebCore::TileCache::tileGridExtent): Return a rect with the size of
2459         the grid as top,left width,height.
2460
2461 2012-11-17  Andreas Kling  <akling@apple.com>
2462
2463         Avoid full style recalc when 'style' attribute changes.
2464         <http://webkit.org/b/78718>
2465
2466         Reviewed by Anders Carlsson.
2467
2468         Use setNeedsStyleRecalc(InlineStyleChange) when the 'style' attribute changes
2469         to reduce the amount of work done in recalcStyle().
2470
2471         * dom/StyledElement.cpp:
2472         (WebCore::StyledElement::styleAttributeChanged):
2473
2474 2012-11-17  Li Yin  <li.yin@intel.com>
2475
2476         Remove coneGain and distanceGain attributes from PannerNode.idl
2477         https://bugs.webkit.org/show_bug.cgi?id=102343
2478
2479         Reviewed by Chris Rogers.
2480
2481         Removing .coneGain and .distanceGain as publicly accessible values,
2482         since normally they only need to be calculated internally.
2483
2484         No changes to tests, since these attributes were not tested and are being removed.
2485
2486         * Modules/webaudio/PannerNode.idl:
2487
2488 2012-11-17  Balazs Kelemen  <kbalazs@webkit.org>
2489
2490         [Coordinated Graphics] Resumed animations leave an obsolate GraphicsLayerAnimation behind
2491         https://bugs.webkit.org/show_bug.cgi?id=102530
2492
2493         Reviewed by Noam Rosenthal.
2494
2495         GraphicsLayer::addAnimation is called no only when a new animation is created
2496         but also when resuming a paused animation. If this is a resumed animation we
2497         should remove the obsolate GraphicsLayerAnimation object.
2498
2499         Tested by animations tests.
2500
2501         * platform/graphics/GraphicsLayerAnimation.cpp:
2502         (WebCore::GraphicsLayerAnimations::add):
2503
2504 2012-11-17  Martin Robinson  <mrobinson@igalia.com>
2505
2506         [Soup] CredentialStorage should only be used for HTTP-family requests
2507         https://bugs.webkit.org/show_bug.cgi?id=102582
2508
2509         Reviewed by Gustavo Noronha Silva.
2510
2511         Do not use CredentialStorage when handling non-HTTP family requests. CredentialStorage
2512         only expects to handle requests in the HTTP family.
2513
2514         No new tests. This is covered by existing tests.
2515
2516         * platform/network/ResourceHandle.h:
2517         (ResourceHandle): Add a shouldUseCredentialStorage helper to ResourceHandle. This
2518         helper returns false when firstRequest() is a non-HTTP family request.
2519         * platform/network/soup/ResourceHandleSoup.cpp:
2520         (WebCore::applyAuthenticationToRequest): Use the new helper.
2521         (WebCore::createSoupRequestAndMessageForHandle): Ditto.
2522         (WebCore::ResourceHandle::start): Ditto.
2523         (WebCore::ResourceHandle::shouldUseCredentialStorage): Ditto.
2524         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Ditto.
2525         (WebCore::ResourceHandle::receivedCredential): Ditto.
2526
2527 2012-11-16  Patrick Gansterer  <paroga@webkit.org>
2528
2529         Build fix for !USE(ACCELERATED_COMPOSITING) after r135029.
2530
2531         * rendering/RenderLayer.cpp:
2532         (WebCore::RenderLayer::paintOverflowControls):
2533
2534 2012-11-16  Benjamin Poulain  <bpoulain@apple.com>
2535
2536         Improve the performance of rect transform
2537         https://bugs.webkit.org/show_bug.cgi?id=101828
2538
2539         Reviewed by Simon Fraser.
2540
2541         Mapping a rect and a quad by a transform is a common operation because
2542         we use it to recompute the repaint rect, overflow rect, etc.
2543
2544         The way it was done, is by transforming through mapRect()->mapQuad()->4 times mapPoint().
2545         Each of those functions tests isIdentityOrTranslation() which has to read the whole matrix
2546         and perform many comparison.
2547         Because of that, the simple mapping of a rect was loading and checking the matrix 5 times
2548         too many.
2549
2550         This patch just cut the intermediary calls.
2551
2552         On ARM, putting the operation together also has the advantage of loading the matrix
2553         only once in registers and reusing it for every point.
2554
2555         * platform/graphics/transforms/TransformationMatrix.cpp:
2556         (WebCore::TransformationMatrix::mapPoint):
2557         (WebCore::TransformationMatrix::mapRect):
2558         * platform/graphics/transforms/TransformationMatrix.h:
2559         (WebCore):
2560         (WebCore::TransformationMatrix::mapPointImpl): New convenience function to perform the
2561         point project without doing isIdentityOrTranslation().
2562
2563 2012-11-16  Simon Fraser  <simon.fraser@apple.com>
2564
2565         Avoid calling the virtual isBlockFlow() in RenderBox::computeRectForRepaint()
2566         https://bugs.webkit.org/show_bug.cgi?id=102581
2567
2568         Reviewed by Dan Bernstein.
2569
2570         isBlockFlow() is a virtual function call, and shows up in profiles of
2571         Facebook pages as called from RenderBox::computeRectForRepaint().
2572         
2573         It's faster to do the hasColumns() bit-check first. Also replace
2574         a call to layer() with the hasLayer() bit-check.        
2575
2576         * rendering/RenderBox.cpp:
2577         (WebCore::RenderBox::computeRectForRepaint):
2578
2579 2012-11-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2580
2581         Unreviewed, rolling out r134817.
2582         http://trac.webkit.org/changeset/134817
2583         https://bugs.webkit.org/show_bug.cgi?id=102576
2584
2585         Broke iframes and causing tons of crashes on ClusterFuzz
2586         (Requested by inferno-sec on #webkit).
2587
2588         * dom/ContainerNode.cpp:
2589         (WebCore::willRemoveChildren):
2590         * dom/ContainerNodeAlgorithms.cpp:
2591         (WebCore::ChildFrameDisconnector::collectDescendant):
2592         * dom/ContainerNodeAlgorithms.h:
2593         (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
2594         (WebCore::ChildFrameDisconnector::~ChildFrameDisconnector):
2595         (ChildFrameDisconnector):
2596         (WebCore::ChildFrameDisconnector::collectDescendant):
2597         (WebCore::ChildFrameDisconnector::disconnect):
2598         * dom/Node.cpp:
2599         * dom/Node.h:
2600         (Node):
2601         * dom/NodeRareData.h:
2602         (WebCore::NodeRareData::NodeRareData):
2603         (NodeRareData):
2604         * html/HTMLFrameOwnerElement.cpp:
2605         (WebCore::HTMLFrameOwnerElement::setContentFrame):
2606         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
2607
2608 2012-11-16  Simon Fraser  <simon.fraser@apple.com>
2609
2610         Fix overlay scrollbar painting in compositing layers
2611         https://bugs.webkit.org/show_bug.cgi?id=102442
2612
2613         Reviewed by Beth Dakin.
2614
2615         There were two issues with overlay scrollbar painting in
2616         compositing layers.
2617         
2618         First, we'd only ever call setContainsDirtyOverlayScrollbars()
2619         on the RenderView's layer, even when encountering an overlay scrollbar
2620         in some descendant compositing layer. This meant that we'd never
2621         run the paintOverlayScrollbars() code for those child compositing
2622         layers, so sometimes scrollbars were missing there.
2623         
2624         Even after fixing that, we would fail to render scrollbars that
2625         were not in the composited RenderLayer itself. This happened because
2626         we called into RenderLayer::paintOverlayScrollbars(), which called
2627         paintLayer() with flags that only said to paint the overlay scrollbars
2628         but not any descendants, so this paint path would not walk child
2629         RenderLayers.
2630         
2631         Also remove the containsScrollableAreaWithOverlayScrollbars() flag on
2632         ScrollView which is no longer used.
2633
2634         * platform/ScrollView.cpp:
2635         (WebCore::ScrollView::ScrollView): Remove containsScrollableAreaWithOverlayScrollbars().
2636         (WebCore::ScrollView::paint): Remove setting of m_containsScrollableAreaWithOverlayScrollbars.
2637         * platform/ScrollView.h:
2638         * rendering/RenderLayer.cpp:
2639         (WebCore::RenderLayer::paintOverflowControls): Call setContainsDirtyOverlayScrollbars()
2640         on the compositing ancestor or the root.
2641         Remove call to setContainsScrollableAreaWithOverlayScrollbars().
2642         (WebCore::RenderLayer::paintOverlayScrollbars): When painting overlay
2643         scrollbars, no need to say we have transparency, and no need to use 
2644         temporary clip rects.
2645         (WebCore::RenderLayer::paintLayer): The PaintLayerPaintingOverlayScrollbars
2646         check here was only needed because the compositing entrypoint to painting
2647         overlay scrollbars went via paintLayer(), which isn't normally used as
2648         a composited painting entry point. Now that we no longer call that, we
2649         don't need this special check.
2650         * rendering/RenderLayerBacking.cpp:
2651         (WebCore::RenderLayerBacking::paintIntoLayer): Jump into overlay scrollbar
2652         painting via paintLayerContents(), not paintOverlayScrollbars(), since
2653         the latter does not traverse sublayers.
2654
2655 2012-11-16  Joshua Bell  <jsbell@chromium.org>
2656
2657         IndexedDB: Assert hit when getting non-existent object store in version change transaction
2658         https://bugs.webkit.org/show_bug.cgi?id=102547
2659
2660         Reviewed by Tony Chang.
2661
2662         Code did not account for the not-found case in "versionchange" transactions, where all
2663         object stores are implicitly in scope.
2664
2665         Test: storage/indexeddb/object-lookups-in-versionchange.html
2666
2667         * Modules/indexeddb/IDBTransaction.cpp:
2668         (WebCore::IDBTransaction::objectStore):
2669
2670 2012-11-12  Simon Fraser  <simon.fraser@apple.com>
2671
2672         Eliminate ancestor tree walk computing outlineBoundsForRepaint() when updating layer positions
2673         https://bugs.webkit.org/show_bug.cgi?id=101874
2674
2675         Reviewed by Dave Hyatt.
2676
2677         RenderLayer::updateLayerPositions() and updateLayerPositionsAfterScroll() spend a
2678         lot of time in computeRepaintRects(), which does two ancestor tree walks, once
2679         for clippedOverflowRectForRepaint(), and one for outlineBoundsForRepaint().
2680
2681         Eliminate the ancestor tree walk in outlineBoundsForRepaint() by maintaining
2682         a RenderGeometryMap as we traverse the layer tree, and then using it to map
2683         the outline bounds to the repaint container. Replace the hokey cached offsetFromRoot
2684         now that the RenderGeometryMap can do a better job.
2685         
2686         The clipped overflow rect cannot be mapped simply, so cannot yet make use of
2687         the geometry map.
2688         
2689         Modify the RenderGeometryMap to support mapping to some repaintContainer ancestor.
2690         Add a RenderObject walk that is necessary to detect flipped writing mode blocks.
2691         
2692         Pass the RenderGeometryMap as an optional parameter to outlineBoundsForRepaint.
2693         
2694         * page/FrameView.cpp:
2695         (WebCore::FrameView::layout): Make a RenderGeometryMap and pass it down
2696         to updateLayerPositions(). For partial layouts, we have to push layers
2697         between the root and the enclosing layer of the layout subtree.
2698         The geometry map used for repainting does not use SnapOffsetForTransforms,
2699         so initialize it explicitly with just the UseTransforms flag.
2700         (WebCore::FrameView::repaintFixedElementsAfterScrolling): Make a RenderGeometryMap
2701         to pass along to updateLayerPositionsAfterScroll().
2702         * rendering/RenderBox.cpp:
2703         (WebCore::RenderBox::outlineBoundsForRepaint): Replace the optional cachedOffsetToRepaintContainer
2704         parameter with an optional RenderGeometryMap, and it use to map the compute rect to
2705         repaintContainer coordinates.
2706         * rendering/RenderBox.h:
2707         * rendering/RenderGeometryMap.cpp:
2708         (WebCore::RenderGeometryMap::RenderGeometryMap): This now has to store the mapping
2709         flags to use, so that its behavior can match that of mapLocalToContainer(). The
2710         pertinent flag is the confusingly named SnapOffsetForTransforms.
2711         (WebCore::RenderGeometryMap::absolutePoint): Call the new mapToContainer() with
2712         a null container.
2713         (WebCore::RenderGeometryMap::absoluteRect): Ditto.
2714         (WebCore::RenderGeometryMap::mapToContainer): Map to the supplied container,
2715         asserting that we found it. Add point- and rect-based mapping methods
2716         akin to the old absoluteRect/absolutePoint.
2717         (WebCore::canMapViaLayer): We need to test for isRenderFlowThread() here too.
2718         (WebCore::RenderGeometryMap::pushMappingsToAncestor): When mapping via
2719         layers, ensure that the RenderView is pushed as the first step.
2720         * rendering/RenderGeometryMap.h:
2721         (RenderGeometryMap):
2722         * rendering/RenderLayer.cpp:
2723         (WebCore::RenderLayer::updateLayerPositionsAfterLayout): New wrapper for updateLayerPositions()
2724         that makes the geometry map.
2725         (WebCore::RenderLayer::updateLayerPositionsAfterScroll): New wrapper for updateLayerPositionsAfterScroll
2726         that makes the geometry map.
2727         (WebCore::RenderLayer::updateLayerPositions): Now takes an optional RenderGeometryMap.
2728         Remove the old offsetFromRoot code. Push and pop layers to/from the geometry map. Use
2729         the geometry map to get the offsetFromRoot as needed by overflow controls. Pass
2730         it to computeRepaintRects().
2731         (WebCore::RenderLayer::computeRepaintRects): Pass the geometry map to outlineBoundsForRepaint().
2732         (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Push and pop to/from the
2733         geometry map, and pass it to computeRepaintRects().
2734         (WebCore::RenderLayer::removeOnlyThisLayer): Remove the offsetFromRootBeforeMove
2735         computation; this could use a geometry map in future if it is shown to be a bottleneck.
2736         * rendering/RenderLayer.h:
2737         (WebCore::RenderLayer::canUseConvertToLayerCoords): It was thought that the isComposited()
2738         was there because the older cached offsetFromRoot logic was sensitive to compositing,
2739         but convertToLayerCoords() is not affected by compositing so this check is not needed,
2740         and actually harmful.
2741         * rendering/RenderLayerCompositor.cpp:
2742         (WebCore::RenderLayerCompositor::OverlapMap::OverlapMap): The geometry map
2743         used for overlap testing should not use SnapOffsetForTransforms, so initialize
2744         it explicitly with just the UseTransforms flag.
2745         * rendering/RenderObject.h:
2746         (WebCore::RenderObject::outlineBoundsForRepaint):
2747         * rendering/svg/RenderSVGModelObject.cpp:
2748         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
2749         * rendering/svg/RenderSVGModelObject.h:
2750         (RenderSVGModelObject):
2751
2752 2012-11-16  Alec Flett  <alecflett@chromium.org>
2753
2754         Add tests for explicit serialization values
2755         https://bugs.webkit.org/show_bug.cgi?id=96818
2756
2757         Reviewed by Adam Barth.
2758
2759         Expose direct access to the serialization/deserialization mechanisms
2760         of SerializedScriptValue to DumpRenderTree.
2761
2762         * testing/Internals.cpp:
2763         (WebCore::Internals::serializeObject):
2764         (WebCore):
2765         (WebCore::Internals::deserializeBuffer):
2766         * testing/Internals.h:
2767         (WebCore):
2768         * testing/Internals.idl:
2769
2770 2012-11-16  Andreas Kling  <akling@apple.com>
2771
2772         Exploit shared attribute data to avoid parsing identical "style" attributes.
2773         <http://webkit.org/b/101163>
2774
2775         Reviewed by Antti Koivisto.
2776
2777         Track the "inline style dirty" state on ElementAttributeData instead of in a Node flag.
2778         This allows us to avoid duplicate work for ElementAttributeData that are shared between multiple elements,
2779         since the state is no longer per-Element.
2780
2781         * css/StyleResolver.cpp:
2782         (WebCore::isCacheableInMatchedPropertiesCache):
2783
2784             Disable the matched properties cache for styles with non-standard writing-mode.
2785             This is necessary because some CSS properties have different meaning depending on context -
2786             properties handled by CSSProperty::resolveDirectionAwareProperty().
2787
2788             Now that multiple elements may have identical inlineStyle() pointers, this is necessary to
2789             avoid mapping StylePropertySets with direction-aware properties to RenderStyles with differing
2790             writing-modes in the matched properties cache.
2791
2792         * dom/Node.h:
2793         * dom/ElementAttributeData.cpp:
2794         (WebCore::ElementAttributeData::ElementAttributeData):
2795         * dom/ElementAttributeData.h:
2796         (WebCore::ElementAttributeData::ElementAttributeData):
2797         (ElementAttributeData):
2798         * dom/Element.h:
2799         (WebCore::Element::updateInvalidAttributes):
2800         * dom/Element.cpp:
2801         (WebCore::Element::getAttribute):
2802         (WebCore::Element::removeAttribute):
2803         * dom/StyledElement.h:
2804         (WebCore::StyledElement::invalidateStyleAttribute):
2805         * dom/StyledElement.cpp:
2806         (WebCore::StyledElement::updateStyleAttribute):
2807
2808             Move "style attribute dirty" flag to ElementAttributeData.
2809
2810         (WebCore::Element::cloneAttributesFromElement):
2811
2812             Remove ugly optimization to avoid reparsing inline style when cloning elements. This now happens
2813             automagically since cloning nodes just refs the original attribute data.
2814
2815         * dom/StyledElement.cpp:
2816         (WebCore::StyledElement::updateStyleAttribute):
2817         (WebCore::StyledElement::setInlineStyleFromString):
2818         (WebCore::StyledElement::styleAttributeChanged):
2819         (WebCore::StyledElement::inlineStyleChanged):
2820
2821             Avoid reparsing the inline style if the element's attribute data is immutable and already has
2822             a parsed inlineStyle(). Split the set-inline-style-from-string code out of styleAttributeChanged()
2823             to make the code more understandable.
2824
2825 2012-11-16  Simon Fraser  <simon.fraser@apple.com>
2826
2827         Don't update layer positions on scrolling if we're in the middle of layout
2828         https://bugs.webkit.org/show_bug.cgi?id=102556
2829
2830         Reviewed by Dan Bernstein.
2831
2832         RenderLayer::scrollTo() can be called in the middle of layout. When
2833         that happens we should not waste time updating layer positions,
2834         compositing layers, or widget positions, because we'll do those at the
2835         end of layout anyway.
2836         
2837         This prevents us from having inconsistent RenderLayer state, which
2838         hinders future optimizations in this area.
2839
2840         * rendering/RenderLayer.cpp:
2841         (WebCore::RenderLayer::scrollTo):
2842
2843 2012-11-16  Tony Chang  <tony@chromium.org>
2844
2845         Remove ENABLE_CSS_HIERARCHIES since it's no longer in use
2846         https://bugs.webkit.org/show_bug.cgi?id=102554
2847
2848         Reviewed by Andreas Kling.
2849
2850         As mentioned in https://bugs.webkit.org/show_bug.cgi?id=79939#c41 ,
2851         we're going to revist this feature once additional vendor support is
2852         achieved.
2853
2854         No new tests, just removing an unused define.
2855
2856         * Configurations/FeatureDefines.xcconfig:
2857         * GNUmakefile.features.am:
2858
2859 2012-11-16  Mark Pilgrim  <pilgrim@chromium.org>
2860
2861         [Chromium] Remove cookie-related functions from PlatformSupport
2862         https://bugs.webkit.org/show_bug.cgi?id=99340
2863
2864         Reviewed by Adam Barth.
2865
2866         Move cookie-related functions out of PlatformSupport and implement
2867         new PlatformCookieJar interface via NetworkContext.
2868
2869         * WebCore.gyp/WebCore.gyp:
2870         * WebCore.gypi:
2871         * loader/CookieJar.cpp:
2872         * loader/chromium/CookieJarChromium.cpp: Removed.
2873         * platform/chromium/PlatformSupport.h:
2874         (WebCore):
2875         (PlatformSupport):
2876         * platform/network/NetworkingContext.h:
2877         (WebKit):
2878         (NetworkingContext):
2879         * platform/network/chromium/CookieJarChromium.cpp: Copied from Source/WebCore/loader/chromium/CookieJarChromium.cpp.
2880         (WebCore::setCookiesFromDOM):
2881         (WebCore::cookiesForDOM):
2882         (WebCore::cookieRequestHeaderFieldValue):
2883         (WebCore::cookiesEnabled):
2884         (WebCore::getRawCookies):
2885         (WebCore::deleteCookie):
2886         (WebCore::getHostnamesWithCookies):
2887         (WebCore::deleteCookiesForHostname):
2888         (WebCore::deleteAllCookies):
2889
2890 2012-11-16  Pablo Flouret  <pablof@motorola.com>
2891
2892         [JSC] Don't sanitize window.onerror information on crossorigin-enabled scripts
2893         https://bugs.webkit.org/show_bug.cgi?id=70574
2894
2895         Reviewed by Geoffrey Garen.
2896
2897         For scripts that use CORS (via the crossorigin attribute in this case),
2898         don't sanitize the information passed to the window's onerror handler (i.e.
2899         message, url, and line number). Useful for scripts hosted on CDNs.
2900
2901         Tests: http/tests/security/script-crossorigin-onerror-information.html
2902                http/tests/security/script-no-crossorigin-onerror-should-be-sanitized.html
2903
2904         * WebCore.exp.in:
2905         * WebCore.order:
2906
2907         * bindings/js/JSDOMBinding.cpp:
2908         (WebCore::reportException):
2909         * bindings/js/JSDOMBinding.h:
2910         (WebCore):
2911         * bindings/js/ScriptController.cpp:
2912         (WebCore::ScriptController::evaluateInWorld):
2913         * bindings/js/ScriptSourceCode.h:
2914         (WebCore::ScriptSourceCode::ScriptSourceCode):
2915         (WebCore::ScriptSourceCode::cachedScript):
2916         (ScriptSourceCode):
2917         * bindings/js/WorkerScriptController.cpp:
2918         (WebCore::WorkerScriptController::evaluate):
2919             Keep a reference to the cached script in the ScriptSourceCode, so
2920             that it can be passed around and be available when reporting the
2921             exception.
2922
2923         * dom/ScriptExecutionContext.cpp:
2924         (WebCore::ScriptExecutionContext::sanitizeScriptError):
2925         (WebCore::ScriptExecutionContext::reportException):
2926         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
2927         * dom/ScriptExecutionContext.h:
2928         (WebCore):
2929         (ScriptExecutionContext):
2930             Check if the script passes the access control checks, and if so,
2931             don't sanitize the error information.
2932
2933         * html/parser/HTMLPreloadScanner.cpp:
2934         (WebCore::PreloadTask::processAttributes):
2935         (WebCore::PreloadTask::preload):
2936         (PreloadTask):
2937         (WebCore::PreloadTask::crossOriginModeAllowsCookies):
2938             When preloading script elements, check for the crossorigin attribute
2939             and adjust the request's allowCookies value accordingly. Otherwise
2940             when the script is loaded from the cache later on, the cross origin mode
2941             (anonymous/use-credentials) will be effectively ignored.
2942
2943 2012-11-16  Jon Lee  <jonlee@apple.com>
2944
2945         Change visual look of placeholder
2946         https://bugs.webkit.org/show_bug.cgi?id=102149
2947         <rdar://problem/12695566>
2948
2949         Reviewed by Darin Adler.
2950
2951         Move the button to the lower-right corner. Move the theming into
2952         RenderSnapshottedPlugin for now. Eventually we will want to migrate to using the
2953         shadow DOM instead, and the metrics of the button are needed for click passthrough.
2954
2955         * Resources/startButton.png: Added.
2956         * Resources/startButton@2x.png: Added.
2957         * Resources/startButtonPressed.png: Added.
2958         * Resources/startButtonPressed@2x.png: Added.
2959         * WebCore.xcodeproj/project.pbxproj: Add button images.
2960
2961         Maintain variables to track whether the mouse is over the button, and the rect
2962         for the button. If the user clicks in the rect, we render a pressed button.
2963         * rendering/RenderSnapshottedPlugIn.cpp:
2964         (WebCore): Add named constant for bottom and right padding of the button.
2965         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
2966         (WebCore::RenderSnapshottedPlugIn::paintReplaced):
2967         (WebCore::startButtonImage): Returns button image.
2968         (WebCore::startButtonPressedImage): Returns pressed button image.
2969         (WebCore::RenderSnapshottedPlugIn::paintButton): Draw the button image in the
2970         lower right hand corner, but only if we are active or hovered.
2971         (WebCore::RenderSnapshottedPlugIn::repaintButton): Stubbed to call repaint().
2972         (WebCore::RenderSnapshottedPlugIn::handleEvent): Repaint the button if we are
2973         hovering over the plugin rect. With a mouse down event, calculate whether the
2974         mouse position is within the button rect.
2975         (WebCore::RenderSnapshottedPlugIn::layout): Cache the rect representing the button
2976         contents.
2977         * rendering/RenderSnapshottedPlugIn.h:
2978
2979         Remove theming function for now.
2980         * rendering/RenderTheme.h:
2981         (RenderTheme):
2982         * rendering/RenderThemeMacShared.h:
2983         * rendering/RenderThemeMacShared.mm:
2984
2985 2012-11-16  Eric Seidel  <eric@webkit.org>
2986
2987         Deploy ScriptWrappable to more always-wrapped objects
2988         https://bugs.webkit.org/show_bug.cgi?id=102539
2989
2990         Reviewed by Adam Barth.
2991
2992         Add the ScriptWrappable baseclass to:
2993         CSSStyleDeclaration (anttik tells me these should only be used from JS, even though some old Editing code used to use them)
2994         ClientRect (element.getBoundingClientRects)
2995         Event (Not all events end up wrapped, but any which live past dispatch do)
2996         NodeList (this covers Static and Dynamic node list types, like document.all)
2997         HTMLCollection (separate from NodeList, for things like table.rows)
2998         Storage (for window.storage, always wrapped)
2999         XMLHttpRequest (always wrapped, created from JS)
3000
3001         This should be a small memory savings as the inline pointer is only 4-8 bytes
3002         instead of the hashmap entry which would be 8-16.  This may also show up
3003         on benchmarks which repeatedly access these objects (like window.storage).
3004
3005         These were found by adding a couple lines of logging-code to
3006         WebCore::createWrapper when we were in the main world, but took the
3007         HashMap (instead of inline) storage path. I used sort and uniq -c
3008         to find the most-frequently wrapped objects (while surfing
3009         a few common sites) and came up with this list.  There are still a few
3010         more complicated objects (like CSSStyleDeclaration) which may benifit
3011         from inline-wrapper-access and will be covered in a later patch.
3012
3013         * css/CSSStyleDeclaration.h:
3014         * dom/ClientRect.h:
3015         * dom/Event.h:
3016         * dom/NodeList.h:
3017         * html/HTMLCollection.h:
3018         * storage/Storage.h:
3019         * xml/XMLHttpRequest.h:
3020
3021 2012-11-16  Jon Lee  <jonlee@apple.com>
3022
3023         Simulated events instances do not all have the same underlying event
3024         https://bugs.webkit.org/show_bug.cgi?id=102468
3025         <rdar://problem/12716331>
3026
3027         Reviewed by Alexey Proskuryakov.
3028
3029         The PassRefPtr with the underlying event is included as an argument for the mouse
3030         down, up, and click events. But the PassRefPtr loses its underlying pointer after
3031         the first simulated mouse down event because it gets assigned to that event's
3032         private m_underlyingEvent variable. We therefore send NULL to the other events.
3033
3034         The fix is for this and related functions to pass the raw pointer.
3035
3036         A layout test is not possible to put together because the call sites that use simulated
3037         events with an underlying event do not send mouse events, and those that send mouse
3038         events have a NULL underlying event.
3039
3040         * dom/EventDispatcher.cpp:
3041         (WebCore::EventDispatcher::dispatchSimulatedClick): Require passing in the raw pointer.
3042         * dom/EventDispatcher.h:
3043         * dom/Node.cpp:
3044         (WebCore::Node::dispatchSimulatedClick): Ditto.
3045         * dom/Node.h:
3046
3047 2012-11-16  Patrick Gansterer  <paroga@webkit.org>
3048
3049         Build fix for WinCE after r134936.
3050
3051         * platform/network/win/CookieJarWin.cpp:
3052         (WebCore::cookieRequestHeaderFieldValue):
3053
3054 2012-11-16  Dimitri Glazkov  <dglazkov@chromium.org>
3055
3056         Unreviewed, rolling out r134986.
3057         http://trac.webkit.org/changeset/134986
3058         https://bugs.webkit.org/show_bug.cgi?id=102110
3059
3060         Triggered ASSERT in fast/frames/seamless/seamless-inherited-
3061         origin.html.
3062
3063         * css/StyleResolver.cpp:
3064         (WebCore::StyleResolver::StyleResolver):
3065         (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets):
3066         (WebCore::collectCSSOMWrappers):
3067         * css/StyleResolver.h:
3068         (StyleResolver):
3069         * dom/Document.cpp:
3070         (WebCore::Document::setCompatibilityMode):
3071         * dom/DocumentStyleSheetCollection.cpp:
3072         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
3073         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
3074         (WebCore::DocumentStyleSheetCollection::pageGroupUserSheets):
3075         (WebCore):
3076         (WebCore::DocumentStyleSheetCollection::clearPageGroupUserSheets):
3077         (WebCore::DocumentStyleSheetCollection::updatePageGroupUserSheets):
3078         (WebCore::DocumentStyleSheetCollection::addUserSheet):
3079         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
3080         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
3081         * dom/DocumentStyleSheetCollection.h:
3082         (DocumentStyleSheetCollection):
3083         (WebCore::DocumentStyleSheetCollection::documentUserSheets):
3084         * page/PageGroup.cpp:
3085         (WebCore::PageGroup::addUserStyleSheetToWorld):
3086         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
3087         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
3088         (WebCore::PageGroup::removeAllUserContent):
3089         (WebCore::PageGroup::resetUserStyleCacheInAllFrames):
3090         * page/PageGroup.h:
3091         (PageGroup):
3092
3093 2012-11-16  Michael Pruett  <michael@68k.org>
3094
3095         IndexedDB: Propagate DOMRequestState to IndexedDB binding utility functions
3096         https://bugs.webkit.org/show_bug.cgi?id=102430
3097
3098         Reviewed by Adam Barth.
3099
3100         DOMRequestState is currently propagated to some but not all of
3101         the IndexedDB binding utility functions. In order to implement
3102         these functions for JSC, this state must be propagated to all
3103         of the utility functions.
3104
3105         Tests: storage/indexeddb/*
3106
3107         * Modules/indexeddb/IDBCursor.cpp:
3108         (WebCore::IDBCursor::update):
3109         (WebCore::IDBCursor::setValueReady):
3110         * Modules/indexeddb/IDBObjectStore.cpp:
3111         (WebCore::generateIndexKeysForValue):
3112         (WebCore::IDBObjectStore::put):
3113         (WebCore):
3114         * Modules/indexeddb/IDBRequest.cpp:
3115         (WebCore::IDBRequest::onSuccess):
3116         (WebCore::IDBRequest::dispatchEvent):
3117         * Modules/indexeddb/IDBRequest.h:
3118         (WebCore::IDBRequest::requestState):
3119         (IDBRequest):
3120         * bindings/v8/IDBBindingUtilities.cpp:
3121         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
3122         (WebCore::serializeIDBValue):
3123         (WebCore::injectIDBKeyIntoScriptValue):
3124         * bindings/v8/IDBBindingUtilities.h:
3125         (WebCore):
3126
3127 2012-11-16  Byungwoo Lee  <bw80.lee@samsung.com>
3128
3129         Rebaselined run-bindings-tests.
3130         https://bugs.webkit.org/show_bug.cgi?id=102523
3131
3132         Reviewed by Dimitri Glazkov.
3133
3134         Expected results need to be updated after r134931
3135
3136         * bindings/scripts/test/JS/JSTestObj.cpp:
3137         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
3138         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
3139         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
3140         * bindings/scripts/test/V8/V8TestObj.cpp:
3141         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
3142         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
3143         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackCallback):
3144
3145 2012-11-16  Pratik Solanki  <psolanki@apple.com>
3146
3147         For single element arrays use the pointer into the CFDataRef instead of copying data
3148         https://bugs.webkit.org/show_bug.cgi?id=102306
3149         <rdar://problem/12267471>
3150
3151         Reviewed by Alexey Proskuryakov.
3152
3153         We generally copy the data received from CFNetwork into our own buffers. But if the
3154         CFArrayRef has exactly one CFDataRef inside it, then we can just hold on to the CFDataRef
3155         and access its memory directly and avoid making a copy.
3156
3157         This also moves the creation of PurgeableBuffer from CachedResource to SharedBuffer.
3158         SharedBuffer::createPurgeableBuffer() will avoid creating PurgeableBuffer when the
3159         SharedBuffer is backed by a NSData/CFDataRef and when we want to optimize and directly use
3160         the memory in the data array.
3161
3162         No new tests because no change in functionality.
3163
3164         * loader/ResourceBuffer.cpp:
3165         (WebCore::ResourceBuffer::createPurgeableBuffer): Added.
3166         * loader/ResourceBuffer.h:
3167         * loader/cache/CachedResource.cpp:
3168         (WebCore::CachedResource::makePurgeable):
3169         * platform/SharedBuffer.cpp:
3170         (WebCore::SharedBuffer::createPurgeableBuffer): Added.
3171         (WebCore::SharedBuffer::data):
3172         * platform/SharedBuffer.h:
3173         * platform/cf/SharedBufferCF.cpp:
3174         (WebCore::SharedBuffer::platformData): Use reinterpret_cast instead of C-style cast.
3175         (WebCore::SharedBuffer::maybeTransferPlatformData): Use reinterpret_cast instead of C-style cast.
3176         (WebCore::SharedBuffer::singleDataArrayBuffer): Added.
3177
3178 2012-11-16  Antti Koivisto  <antti@apple.com>
3179
3180         REGRESSION(r129644): User StyleSheet not applying
3181         https://bugs.webkit.org/show_bug.cgi?id=102110
3182
3183         Reviewed by Andreas Kling.
3184
3185         Injected stylesheets added as UserStyleAuthorLevel fail to apply. r129644 implicitly assumed that
3186         such things don't exists but on Chromium addUserStyleSheet() confusingly uses them.
3187         
3188         The patch adds injected author stylesheets to DocumentStyleSheetCollection::activeStyleSheets().
3189         It also generally cleans up the code around injected and user stylesheets.
3190
3191         Tests: userscripts/user-script-and-stylesheet.html
3192                userscripts/user-stylesheet-invalidate.html
3193
3194         * css/StyleResolver.cpp:
3195         (WebCore::StyleResolver::StyleResolver):
3196         (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
3197         (WebCore::collectCSSOMWrappers):
3198         * css/StyleResolver.h:
3199         (StyleResolver):
3200         * dom/Document.cpp:
3201         (WebCore::Document::setCompatibilityMode):
3202         * dom/DocumentStyleSheetCollection.cpp:
3203         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
3204         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
3205         (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets):
3206         (WebCore):
3207         (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets):
3208         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
3209         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
3210         (WebCore::DocumentStyleSheetCollection::addUserSheet):
3211         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
3212         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
3213         * dom/DocumentStyleSheetCollection.h:
3214         (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
3215         (DocumentStyleSheetCollection):
3216         * page/PageGroup.cpp:
3217         (WebCore::PageGroup::addUserStyleSheetToWorld):
3218         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
3219         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
3220         (WebCore::PageGroup::removeAllUserContent):
3221         (WebCore::PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames):
3222         * page/PageGroup.h:
3223         (PageGroup):
3224
3225 2012-11-16  Andreas Kling  <akling@apple.com>
3226
3227         StyleResolver: Only input elements need equal "readonly" attribute for style sharing.
3228         <http://webkit.org/b/102536>
3229
3230         Reviewed by Antti Koivisto.
3231
3232         Move the comparison of the "readonly" attribute into canShareStyleWithControl() since it's only
3233         relevant for sharing style between <input> elements.
3234
3235         Also skip attribute comparisons for form control elements that share the same ElementAttributeData.
3236
3237         * css/StyleResolver.cpp:
3238         (WebCore::StyleResolver::canShareStyleWithControl):
3239         (WebCore::haveIdenticalStyleAffectingAttributes):
3240
3241 2012-11-16  Sheriff Bot  <webkit.review.bot@gmail.com>
3242
3243         Unreviewed, rolling out r134867.
3244         http://trac.webkit.org/changeset/134867
3245         https://bugs.webkit.org/show_bug.cgi?id=102544
3246
3247         Broke security fuzzier test (heap-buffer-overflow) (Requested
3248         by bfulgham on #webkit).
3249
3250         * platform/audio/Biquad.cpp:
3251         (WebCore::Biquad::process):
3252
3253 2012-11-16  Tommy Widenflycht  <tommyw@google.com>
3254
3255         MediaStream API: Update RTCPeerConnection states to match the latest editors draft
3256         https://bugs.webkit.org/show_bug.cgi?id=102382
3257
3258         Reviewed by Adam Barth.
3259
3260         Updating readyState & iceState, and adding iceGatheringState.
3261         Also safeguarding the event timer callback.
3262
3263         Patch covered by existing tests.
3264
3265         * Modules/mediastream/RTCPeerConnection.cpp:
3266         (WebCore::RTCPeerConnection::RTCPeerConnection):
3267         (WebCore::RTCPeerConnection::createOffer):
3268         (WebCore::RTCPeerConnection::createAnswer):
3269         (WebCore::RTCPeerConnection::setLocalDescription):
3270         (WebCore::RTCPeerConnection::localDescription):
3271         (WebCore::RTCPeerConnection::setRemoteDescription):
3272         (WebCore::RTCPeerConnection::remoteDescription):
3273         (WebCore::RTCPeerConnection::updateIce):
3274         (WebCore::RTCPeerConnection::addIceCandidate):
3275         (WebCore::RTCPeerConnection::readyState):
3276         (WebCore::RTCPeerConnection::iceGatheringState):
3277         (WebCore):
3278         (WebCore::RTCPeerConnection::iceState):
3279         (WebCore::RTCPeerConnection::addStream):
3280         (WebCore::RTCPeerConnection::close):
3281         (WebCore::RTCPeerConnection::didChangeIceGatheringState):
3282         (WebCore::RTCPeerConnection::stop):
3283         (WebCore::RTCPeerConnection::changeReadyState):
3284         (WebCore::RTCPeerConnection::scheduledEventTimerFired):
3285         * Modules/mediastream/RTCPeerConnection.h:
3286         (RTCPeerConnection):
3287         * Modules/mediastream/RTCPeerConnection.idl:
3288         * dom/EventNames.h:
3289         (WebCore):
3290         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
3291         (RTCPeerConnectionHandlerClient):
3292         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
3293         (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEGatheringState):
3294         (WebCore):
3295         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
3296         (RTCPeerConnectionHandlerChromium):
3297
3298 2012-11-16  Dimitri Glazkov  <dglazkov@chromium.org>
3299
3300         Unreviewed, rolling out r134973.
3301         http://trac.webkit.org/changeset/134973
3302         https://bugs.webkit.org/show_bug.cgi?id=99340
3303
3304         Broke compile on at least Mac and Linux.
3305
3306         * WebCore.gyp/WebCore.gyp:
3307         * WebCore.gypi:
3308         * loader/CookieJar.cpp:
3309         * loader/chromium/CookieJarChromium.cpp: Renamed from Source/WebKit/chromium/src/FrameNetworkingContextImpl.cpp.
3310         (WebCore):
3311         (WebCore::setCookies):
3312         (WebCore::cookies):
3313         (WebCore::cookieRequestHeaderFieldValue):
3314         (WebCore::cookiesEnabled):
3315         (WebCore::getRawCookies):
3316         (WebCore::deleteCookie):
3317         (WebCore::getHostnamesWithCookies):
3318         (WebCore::deleteCookiesForHostname):
3319         (WebCore::deleteAllCookies):
3320         * platform/chromium/PlatformSupport.h:
3321         (WebCore):
3322         (PlatformSupport):
3323         * platform/network/NetworkingContext.h:
3324         * platform/network/chromium/CookieJarChromium.cpp: Removed.
3325
3326 2012-11-16  Martin Robinson  <mrobinson@igalia.com>
3327
3328         [GTK] [WebKit2] Move GtkAuthenticationDialog to the UIProcess
3329         https://bugs.webkit.org/show_bug.cgi?id=101843
3330
3331         Reviewed by Gustavo Noronha Silva.
3332
3333         Make GtkAuthenticationDialog more general, so that it can be subclassed in 
3334         WebKit2. We cannot use the WebCore authentication-related classes directly there.
3335
3336         No new tests. This patch does not change behavior.
3337
3338         * platform/gtk/GtkAuthenticationDialog.cpp:
3339         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Remove an unused include and reorder
3340         some field initializers.
3341         (WebCore::GtkAuthenticationDialog::authenticate): Now handle both the okay and cancel case here. This
3342         makes it simpler to subclass.
3343         (WebCore::GtkAuthenticationDialog::authenticationDialogResponseCallback): Handle fetching the username
3344         and password here, so that it can be shared with subclasses.
3345         * platform/gtk/GtkAuthenticationDialog.h: Make some methods virtual and protected so they can be
3346         subclasses.
3347
3348 2012-11-16  Mark Pilgrim  <pilgrim@chromium.org>
3349
3350         [Chromium] Remove cookie-related functions from PlatformSupport
3351         https://bugs.webkit.org/show_bug.cgi?id=99340
3352
3353         Reviewed by Adam Barth.
3354
3355         Move cookie-related functions out of PlatformSupport and implement
3356         new PlatformCookieJar interface via NetworkContext.
3357
3358         * WebCore.gyp/WebCore.gyp:
3359         * WebCore.gypi:
3360         * loader/CookieJar.cpp:
3361         * loader/chromium/CookieJarChromium.cpp: Removed.
3362         * platform/chromium/PlatformSupport.h:
3363         (WebCore):
3364         (PlatformSupport):
3365         * platform/network/NetworkingContext.h:
3366         (WebKit):
3367         (NetworkingContext):
3368         * platform/network/chromium/CookieJarChromium.cpp: Copied from Source/WebCore/loader/chromium/CookieJarChromium.cpp.
3369         (WebCore::setCookiesFromDOM):
3370         (WebCore::cookiesForDOM):
3371         (WebCore::cookieRequestHeaderFieldValue):
3372         (WebCore::cookiesEnabled):
3373         (WebCore::getRawCookies):
3374         (WebCore::deleteCookie):
3375         (WebCore::getHostnamesWithCookies):
3376         (WebCore::deleteCookiesForHostname):
3377         (WebCore::deleteAllCookies):
3378
3379 2012-11-16  Byungwoo Lee  <bw80.lee@samsung.com>
3380
3381         Fix assertion bug of build fix r134961
3382         https://bugs.webkit.org/show_bug.cgi?id=102533
3383
3384         Reviewed by Martin Robinson.
3385
3386         Assertion condition should be '!d->m_currentWebChallenge.isNull()'
3387
3388         * platform/network/soup/ResourceHandleSoup.cpp:
3389         (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge):
3390
3391 2012-11-16  Tommy Widenflycht  <tommyw@google.com>
3392
3393         [chromium] MediaStream API: Add missing WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel
3394         https://bugs.webkit.org/show_bug.cgi?id=102386
3395
3396         Reviewed by Adam Barth.
3397
3398         Existing tests expanded to cover patch.
3399
3400         * platform/mediastream/RTCDataChannelDescriptor.cpp:
3401         (WebCore::RTCDataChannelDescriptor::RTCDataChannelDescriptor):
3402         (WebCore::RTCDataChannelDescriptor::readyStateChanged):
3403         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
3404         (WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteDataChannel):
3405         (WebCore):
3406         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
3407         (WebKit):
3408         (RTCPeerConnectionHandlerChromium):
3409
3410 2012-11-16  Scott Violet  <sky@chromium.org>
3411
3412         [chromium] Copy linux theme related files to default
3413         https://bugs.webkit.org/show_bug.cgi?id=102403
3414
3415         Reviewed by Tony Chang
3416
3417         Transitional patch that copies linux WebThemeEngine to default directory.
3418
3419         No new tests, refactoring only.
3420
3421         * WebCore.gyp/WebCore.gyp: Update compile rules when use_default_render_theme is set.
3422         * WebCore.gypi: Adds new files.
3423         * platform/chromium/PlatformSupport.h:
3424         * platform/chromium/PlatformThemeChromiumDefault.cpp: Copied from Source/WebCore/platform/chromium/PlatformThemeChromiumLinux.cpp.
3425         * platform/chromium/PlatformThemeChromiumDefault.h: Copied from Source/WebCore/platform/chromium/PlatformThemeChromiumLinux.h.
3426         * platform/chromium/ScrollbarThemeChromiumDefault.cpp: Copied from Source/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp.
3427         * platform/chromium/ScrollbarThemeChromiumDefault.h: Copied from Source/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.h.
3428         * rendering/RenderThemeChromiumDefault.cpp: Copied from Source/WebCore/rendering/RenderThemeChromiumLinux.cpp.
3429         * rendering/RenderThemeChromiumDefault.h: Copied from Source/WebCore/rendering/RenderThemeChromiumLinux.h.
3430
3431 2012-11-16  Alec Flett  <alecflett@chromium.org>
3432
3433         IndexedDB: add missing 'explicit' and fix backing store release
3434         https://bugs.webkit.org/show_bug.cgi?id=102450
3435
3436         Reviewed by Tony Chang.
3437
3438         A inconsequential regression was introduced in http://trac.webkit.org/changeset/134129
3439         which resulted in objects sticking around a bit longer than
3440         expected. This makes sure the LevelDBTransaction is released
3441         at the moment of commit/rollback rather than when IDBTransactionBackendImpl
3442         is destroyed.
3443
3444         No new tests, this is just internal state that will affect
3445         some future refactoring.
3446
3447         * Modules/indexeddb/IDBBackingStore.h:
3448         (Cursor):
3449         (Transaction):
3450         (WebCore::IDBBackingStore::Transaction::reset):
3451         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3452         (WebCore::IDBTransactionBackendImpl::abort):
3453         (WebCore::IDBTransactionBackendImpl::commit):
3454
3455 2012-11-16  Dimitri Glazkov  <dglazkov@chromium.org>
3456
3457         [Chromium] One last tweak to WebCore.gypi to make Win build not sad.
3458
3459         * WebCore.gypi: Removed one last mention of accessibility/gtk file.
3460
3461 2012-11-16  Robert Flack  <flackr@chromium.org>
3462