c88d687786836dd6cc1f74161ae8cc6dcc5c9493
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-01  Keishi Hattori  <keishi@webkit.org>
2
3         Rename CalendarPickerElement to PickerIndicatorElement
4         https://bugs.webkit.org/show_bug.cgi?id=98096
5
6         Reviewed by Kent Tamura.
7
8         Renaming CalendarPickerElement to PickerIndicatorElement because we want to use it for other input types like time, week, month, datetime.
9
10         No new tests. Just a rename.
11
12         * GNUmakefile.list.am:
13         * WebCore.gypi:
14         * html/DateInputType.cpp:
15         (WebCore::DateInputType::createShadowSubtree):
16         * html/DateInputType.h:
17         (WebCore):
18         (DateInputType):
19         * html/shadow/PickerIndicatorElement.cpp: Renamed from Source/WebCore/html/shadow/CalendarPickerElement.cpp.
20         (WebCore):
21         (WebCore::PickerIndicatorElement::PickerIndicatorElement):
22         (WebCore::PickerIndicatorElement::create):
23         (WebCore::PickerIndicatorElement::~PickerIndicatorElement):
24         (WebCore::PickerIndicatorElement::createRenderer):
25         (WebCore::PickerIndicatorElement::hostInput):
26         (WebCore::PickerIndicatorElement::defaultEventHandler):
27         (WebCore::PickerIndicatorElement::willRespondToMouseClickEvents):
28         (WebCore::PickerIndicatorElement::didChooseValue):
29         (WebCore::PickerIndicatorElement::didEndChooser):
30         (WebCore::PickerIndicatorElement::openPopup):
31         (WebCore::PickerIndicatorElement::closePopup):
32         (WebCore::PickerIndicatorElement::detach):
33         * html/shadow/PickerIndicatorElement.h: Renamed from Source/WebCore/html/shadow/CalendarPickerElement.h.
34         (WebCore):
35         (PickerIndicatorElement):
36
37 2012-10-01  Ojan Vafai  <ojan@chromium.org>
38
39         Unreviewed, rolling out r130079.
40         http://trac.webkit.org/changeset/130079
41         https://bugs.webkit.org/show_bug.cgi?id=95866
42
43         Broke the chomium windows compile.
44
45         * css/CSSFontFace.cpp:
46         (WebCore::CSSFontFace::getFontData):
47         * css/CSSFontFace.h:
48         (CSSFontFace):
49         * css/CSSFontFaceSource.cpp:
50         (WebCore::CSSFontFaceSource::getFontData):
51         * css/CSSFontFaceSource.h:
52         (CSSFontFaceSource):
53         * css/CSSFontSelector.cpp:
54         (WebCore::fontDataForGenericFamily):
55         (WebCore::CSSFontSelector::getFontData):
56         * css/CSSFontSelector.h:
57         * css/CSSSegmentedFontFace.cpp:
58         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
59         (WebCore::CSSSegmentedFontFace::getFontData):
60         * css/CSSSegmentedFontFace.h:
61         (CSSSegmentedFontFace):
62         * dom/Document.cpp:
63         (WebCore::Document::registerCustomFont):
64         * dom/Document.h:
65         (Document):
66         * platform/graphics/Font.h:
67         (WebCore):
68         * platform/graphics/FontCache.cpp:
69         (WebCore):
70         (WebCore::FontCache::getCachedFontData):
71         (WebCore::FontCache::getNonRetainedLastResortFallbackFont):
72         (WebCore::FontCache::releaseFontData):
73         (WebCore::FontCache::purgeInactiveFontData):
74         (WebCore::FontCache::getFontData):
75         * platform/graphics/FontCache.h:
76         (FontCache):
77         * platform/graphics/FontData.h:
78         * platform/graphics/FontFallbackList.cpp:
79         (WebCore::FontFallbackList::releaseFontData):
80         (WebCore::FontFallbackList::fontDataAt):
81         (WebCore::FontFallbackList::setPlatformFont):
82         * platform/graphics/FontFallbackList.h:
83         (FontFallbackList):
84         * platform/graphics/FontFastPath.cpp:
85         (WebCore::Font::glyphDataAndPageForCharacter):
86         * platform/graphics/FontSelector.h:
87         (FontSelector):
88         * platform/graphics/GlyphPageTreeNode.cpp:
89         (WebCore::GlyphPageTreeNode::initializePage):
90         * platform/graphics/SegmentedFontData.cpp:
91         (WebCore::SegmentedFontData::fontDataForCharacter):
92         * platform/graphics/SegmentedFontData.h:
93         (WebCore::FontDataRange::FontDataRange):
94         (WebCore::FontDataRange::fontData):
95         (FontDataRange):
96         (SegmentedFontData):
97         * platform/graphics/SimpleFontData.cpp:
98         (WebCore::SimpleFontData::verticalRightOrientationFontData):
99         (WebCore::SimpleFontData::uprightOrientationFontData):
100         (WebCore::SimpleFontData::brokenIdeographFontData):
101         * platform/graphics/SimpleFontData.h:
102         (SimpleFontData):
103         (WebCore::SimpleFontData::variantFontData):
104         (DerivedFontData):
105         * platform/graphics/chromium/FontCacheAndroid.cpp:
106         (WebCore::FontCache::getFontDataForCharacters):
107         (WebCore::FontCache::getSimilarFontPlatformData):
108         (WebCore::FontCache::getLastResortFallbackFont):
109         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
110         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
111         (GetLastResortFallbackFontProcData):
112         (WebCore::FontCache::getFontDataForCharacters):
113         (WebCore::FontCache::getSimilarFontPlatformData):
114         (WebCore::FontCache::getLastResortFallbackFont):
115         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
116         (WebCore::SimpleFontData::createScaledFontData):
117         (WebCore::SimpleFontData::smallCapsFontData):
118         (WebCore::SimpleFontData::emphasisMarkFontData):
119         * platform/graphics/freetype/FontCacheFreeType.cpp:
120         (WebCore::FontCache::getFontDataForCharacters):
121         (WebCore::FontCache::getSimilarFontPlatformData):
122         (WebCore::FontCache::getLastResortFallbackFont):
123         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
124         (WebCore::SimpleFontData::createScaledFontData):
125         (WebCore::SimpleFontData::smallCapsFontData):
126         (WebCore::SimpleFontData::emphasisMarkFontData):
127         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
128         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
129         * platform/graphics/mac/FontCacheMac.mm:
130         (WebCore::FontCache::getFontDataForCharacters):
131         (WebCore::FontCache::getSimilarFontPlatformData):
132         (WebCore::FontCache::getLastResortFallbackFont):
133         * platform/graphics/mac/FontComplexTextMac.cpp:
134         (WebCore::Font::fontDataForCombiningCharacterSequence):
135         * platform/graphics/mac/SimpleFontDataMac.mm:
136         (WebCore::SimpleFontData::platformDestroy):
137         (WebCore::SimpleFontData::createScaledFontData):
138         (WebCore::SimpleFontData::smallCapsFontData):
139         (WebCore::SimpleFontData::emphasisMarkFontData):
140         * platform/graphics/pango/FontCachePango.cpp:
141         (WebCore::FontCache::getFontDataForCharacters):
142         (WebCore::FontCache::getSimilarFontPlatformData):
143         (WebCore::FontCache::getLastResortFallbackFont):
144         * platform/graphics/pango/SimpleFontDataPango.cpp:
145         (WebCore::SimpleFontData::createScaledFontData):
146         (WebCore::SimpleFontData::smallCapsFontData):
147         (WebCore::SimpleFontData::emphasisMarkFontData):
148         * platform/graphics/qt/FontCacheQt.cpp:
149         (WebCore::FontCache::getFontDataForCharacters):
150         (WebCore::FontCache::getSimilarFontPlatformData):
151         (WebCore::FontCache::getLastResortFallbackFont):
152         * platform/graphics/qt/SimpleFontDataQt.cpp:
153         (WebCore::SimpleFontData::createScaledFontData):
154         (WebCore::SimpleFontData::smallCapsFontData):
155         (WebCore::SimpleFontData::emphasisMarkFontData):
156         * platform/graphics/skia/FontCacheSkia.cpp:
157         (WebCore::FontCache::getFontDataForCharacters):
158         (WebCore::FontCache::getSimilarFontPlatformData):
159         (WebCore::FontCache::getLastResortFallbackFont):
160         * platform/graphics/skia/SimpleFontDataSkia.cpp:
161         (WebCore::SimpleFontData::createScaledFontData):
162         (WebCore::SimpleFontData::smallCapsFontData):
163         (WebCore::SimpleFontData::emphasisMarkFontData):
164         * platform/graphics/win/FontCacheWin.cpp:
165         (WebCore::FontCache::getFontDataForCharacters):
166         (WebCore::FontCache::getSimilarFontPlatformData):
167         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
168         (WebCore::FontCache::getLastResortFallbackFont):
169         * platform/graphics/win/SimpleFontDataWin.cpp:
170         (WebCore::SimpleFontData::createScaledFontData):
171         (WebCore::SimpleFontData::smallCapsFontData):
172         (WebCore::SimpleFontData::emphasisMarkFontData):
173         * platform/graphics/wince/FontCacheWinCE.cpp:
174         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
175         (WebCore::SimpleFontData::createScaledFontData):
176         (WebCore::SimpleFontData::smallCapsFontData):
177         (WebCore::SimpleFontData::emphasisMarkFontData):
178         * platform/graphics/wx/FontCacheWx.cpp:
179         (WebCore::FontCache::getFontDataForCharacters):
180         (WebCore::FontCache::getSimilarFontPlatformData):
181         (WebCore::FontCache::getLastResortFallbackFont):
182         * platform/graphics/wx/SimpleFontDataWx.cpp:
183         (WebCore::SimpleFontData::createScaledFontData):
184         (WebCore::SimpleFontData::smallCapsFontData):
185         (WebCore::SimpleFontData::emphasisMarkFontData):
186
187 2012-10-01  Beth Dakin  <bdakin@apple.com>
188
189         Speculative GTK build fix after http://trac.webkit.org/changeset/130091
190
191         * GNUmakefile.list.am:
192
193 2012-10-01  Adam Barth  <abarth@webkit.org>
194
195         [V8] ScriptWrappable should hold the wrapper handle directly (Dromaeo/dom-traverse gets 4% faster)
196         https://bugs.webkit.org/show_bug.cgi?id=97974
197
198         Reviewed by Kentaro Hara.
199
200         Previously, we stored a pointer to a handle to a wrapper in Node. That
201         is an extra layer of indirection that slows down finding the wrapper
202         for the node. A handle is just a pointer, so we might as we just store
203         the handle in the Node directly. That speeds up dom-traverse by about 4%.
204
205         We were using the extra layer of indirection in IntrusiveDOMWrapperMap
206         to make removal more efficient. Rather than using a chunked table, we
207         now use a HashSet, which also lets us remove elements quickly.
208
209         * bindings/v8/IntrusiveDOMWrapperMap.h:
210         (WebCore::IntrusiveDOMWrapperMap::IntrusiveDOMWrapperMap):
211         (WebCore::IntrusiveDOMWrapperMap::get):
212         (WebCore::IntrusiveDOMWrapperMap::set):
213         (WebCore::IntrusiveDOMWrapperMap::contains):
214         (WebCore::IntrusiveDOMWrapperMap::visit):
215         (WebCore::IntrusiveDOMWrapperMap::removeIfPresent):
216         (WebCore::IntrusiveDOMWrapperMap::clear):
217         * bindings/v8/ScriptWrappable.h:
218         (WebCore::ScriptWrappable::ScriptWrappable):
219         (WebCore::ScriptWrappable::wrapper):
220         (WebCore::ScriptWrappable::setWrapper):
221         (WebCore::ScriptWrappable::disposeWrapper):
222         (WebCore::ScriptWrappable::reportMemoryUsage):
223         (ScriptWrappable):
224         * bindings/v8/V8DOMWrapper.h:
225         (WebCore::V8DOMWrapper::getCachedWrapper):
226
227 2012-10-01  Ojan Vafai  <ojan@chromium.org>
228
229         Unreviewed, rolling out r130062.
230         http://trac.webkit.org/changeset/130062
231         https://bugs.webkit.org/show_bug.cgi?id=98001
232
233         Causes a ton of gtest failures on the chromium bots.
234
235         * platform/chromium/LanguageChromium.cpp:
236         (WebCore::platformLanguage):
237
238 2012-10-01  David Barton  <dbarton@mathscribe.com>
239
240         [MathML] Baseline wrong for fractions or munder/mover with padding
241         https://bugs.webkit.org/show_bug.cgi?id=97990
242
243         Reviewed by Eric Seidel.
244
245         We include any border or padding in our baseline computation. We also take this opportunity
246         to quit adding extra left & right padding to numerators and denominators, making our output
247         tighter and also more compatible with Firefox and TeX, since we are rebaselining some
248         fraction pixel tests now anyway.
249
250         Tests added to LayoutTests/mathml/presentation/{over,row-alignment}.xhtml
251
252         * rendering/mathml/RenderMathMLFraction.cpp:
253         (WebCore::RenderMathMLFraction::fixChildStyle):
254         (WebCore::RenderMathMLFraction::paint):
255         (WebCore::RenderMathMLFraction::firstLineBoxBaseline):
256         * rendering/mathml/RenderMathMLUnderOver.cpp:
257         (WebCore::RenderMathMLUnderOver::firstLineBoxBaseline):
258
259 2012-10-01  Joshua Bell  <jsbell@chromium.org>
260
261         IndexedDB: Fire error rather than raising on request creation if transaction aborts asynchronously.
262         https://bugs.webkit.org/show_bug.cgi?id=93054
263
264         Reviewed by Tony Chang.
265
266         All IDB data operations are asynchronous, producing IDBRequest objects. This was implemented
267         by passing all data from the front-end to the back-end synchronously, and synchronously
268         returning an exception code back if the request was invalid. Previous changes have moved
269         request validation to the front-end except for the case of the back-end transaction having
270         asynchronously aborted in the mean time.
271
272         To eliminate that case (which would allow front-end to back-end communication to be
273         asynchronous in multi-process ports), change from returning an exception code to relying on
274         the front-end to abort the request when the abort event finally arrives.
275
276         The difference would be noticeable in scripts - in a multi-process environment:
277
278         var request1 = store.get(0);
279         request1.onerror = errorHandler; // (A)
280         // (B)
281         var request2 = store.get(0); // (C)
282         request2.onerror = errorHandler; // (D)
283
284         If the transaction back-end were to asynchronously abort at exactly point (B), then prior to
285         this patch an exception would be thrown at (C). With this patch, no exception but (D) would
286         fire, same as (A).
287
288         The back-end explicitly fires an error callback as well, as intermediate layers may rely on
289         this to stop tracking the pending callback.
290
291         No new layout tests - change is not observable in single-process ports.
292         Added webkit_unit_test IDBRequestTest.AbortErrorAfterAbort to verify that IDBRequest
293         is resilient to this pattern, but it was previous.
294
295         * Modules/indexeddb/IDBCursor.cpp:
296         (WebCore::IDBCursor::advance): Back end should never fail a request.
297         (WebCore::IDBCursor::continueFunction): Ditto.
298         (WebCore::IDBCursor::deleteFunction): Ditto, and also move "is key cursor" test
299         here from back-end.
300         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
301         (WebCore::IDBCursorBackendImpl::continueFunction): Change from EC to firing error.
302         (WebCore::IDBCursorBackendImpl::advance): Ditto.
303         (WebCore::IDBCursorBackendImpl::deleteFunction): Ditto, and remove test moved to FE.
304         (WebCore::IDBCursorBackendImpl::prefetchContinue): Ditto.
305         * Modules/indexeddb/IDBDatabaseError.cpp:
306         (WebCore::IDBDatabaseError::create): Add overload that looks up message via code.
307         (WebCore::IDBDatabaseError::IDBDatabaseError): Look up message via exception table.
308         * Modules/indexeddb/IDBDatabaseException.h: Add getErrorDescription.
309         * Modules/indexeddb/IDBDatabaseException.cpp: Implementation of getErrorDescription.
310         * Modules/indexeddb/IDBIndex.cpp:
311         (WebCore::IDBIndex::openCursor): Back end should never fail a request.
312         (WebCore::IDBIndex::count): Ditto.
313         (WebCore::IDBIndex::openKeyCursor): Ditto.
314         (WebCore::IDBIndex::get): Ditto.
315         (WebCore::IDBIndex::getKey): Ditto.
316         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
317         (WebCore::IDBIndexBackendImpl::openCursor): Change from EC to firing error.
318         (WebCore::IDBIndexBackendImpl::openKeyCursor): Ditto.
319         (WebCore::IDBIndexBackendImpl::count): Ditto.
320         (WebCore::IDBIndexBackendImpl::get): Ditto.
321         (WebCore::IDBIndexBackendImpl::getKey): Ditto.
322         * Modules/indexeddb/IDBObjectStore.cpp:
323         (WebCore::IDBObjectStore::get): Back end should never fail a request.
324         (WebCore::IDBObjectStore::put): Ditto.
325         (WebCore::IDBObjectStore::deleteFunction): Ditto.
326         (WebCore::IDBObjectStore::clear): Ditto.
327         (WebCore): Ditto.
328         (WebCore::IDBObjectStore::openCursor): Ditto.
329         (WebCore::IDBObjectStore::count): Ditto.
330         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
331         (WebCore::IDBObjectStoreBackendImpl::get): Change from EC to firing error.
332         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto.
333         (WebCore):
334         (WebCore::IDBObjectStoreBackendImpl::deleteFunction): Ditto.
335         (WebCore::IDBObjectStoreBackendImpl::clear): Ditto.
336         (WebCore::IDBObjectStoreBackendImpl::openCursor): Ditto.
337         (WebCore::IDBObjectStoreBackendImpl::count): Ditto.
338
339 2012-10-01  Ryosuke Niwa  <rniwa@webkit.org>
340
341         Build fix. Clearly, these objects could be instantiated in worker threads.
342         Not sure why my patch asserted that we're in the main thread.
343
344         * dom/ContainerNode.h:
345         (WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
346         (WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion):
347
348 2012-10-01  Beth Dakin  <bdakin@apple.com>
349
350         https://bugs.webkit.org/show_bug.cgi?id=97365
351         ScrollingTreeState needs to be a tree of nodes
352
353         Reviewed by Simon Fraser.
354
355         This patch should not change any behavior.
356
357         Prior to this patch, ScrollingTreeState attempted to contain all of 
358         the state information needed for the whole scrolling tree in one 
359         object. But in the future when there are multiple nodes in the 
360         scrolling tree, a single state object will not be sufficient. 
361         ScrollingState should also be represented by a tree. This patch makes 
362         scrolling state into a tree. The old ScrollingTreeState class has 
363         become the ScrollingStateScrollingNode class since the majority of 
364         the class represents scroll state that is specific to ScrollableAreas 
365         and will not be applicable to fixed or sticky layers.
366
367         Some new files and some moved files.
368         * WebCore.xcodeproj/project.pbxproj:
369
370         Everything that used to refer to the ScrollingTreeState should now 
371         refer to the ScrollingStateTree instead. Right now, all of this code 
372         continues to deal with only the root node of the tree. In the future, 
373         it will have to deal with all of the nodes.
374         * page/scrolling/ScrollingCoordinator.cpp:
375         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
376         (WebCore::ScrollingCoordinator::pageDestroyed):
377         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
378         (WebCore::ScrollingCoordinator::setScrollLayer):
379         (WebCore::ScrollingCoordinator::setNonFastScrollableRegion):
380         (WebCore::ScrollingCoordinator::setScrollParameters):
381         (WebCore::ScrollingCoordinator::setWheelEventHandlerCount):
382         (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
383         (WebCore::ScrollingCoordinator::scheduleTreeStateCommit):
384         (WebCore::ScrollingCoordinator::scrollingStateTreeCommitterTimerFired):
385         (WebCore::ScrollingCoordinator::commitTreeStateIfNeeded):
386         (WebCore::ScrollingCoordinator::commitTreeState):
387         * page/scrolling/ScrollingCoordinator.h:
388         (WebCore):
389         (ScrollingCoordinator):
390
391         This is a new abstract base class for the nodes in the 
392         ScrollingStateTree.
393         * page/scrolling/ScrollingStateNode.cpp: Added.
394         (WebCore):
395         (WebCore::ScrollingStateNode::ScrollingStateNode):
396         (WebCore::ScrollingStateNode::~ScrollingStateNode):
397         (WebCore::ScrollingStateNode::appendChild):
398         (WebCore::ScrollingStateNode::cloneChildNodes):
399         (WebCore::ScrollingStateNode::traverseNext):
400         * page/scrolling/ScrollingStateNode.h: Added.
401         (WebCore):
402         (ScrollingStateNode):
403         (WebCore::ScrollingStateNode::scrollLayerDidChange):
404         (WebCore::ScrollingStateNode::setScrollLayerDidChange):
405         (WebCore::ScrollingStateNode::scrollingStateTree):
406         (WebCore::ScrollingStateNode::parent):
407         (WebCore::ScrollingStateNode::firstChild):
408         (WebCore::ScrollingStateNode::nextSibling):
409         (WebCore::ScrollingStateNode::setParent):
410         (WebCore::ScrollingStateNode::setFirstChild):
411         (WebCore::ScrollingStateNode::setNextSibling):
412         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
413         * page/scrolling/mac/ScrollingStateNodeMac.mm: Copied from page/scrolling/mac/ScrollingTreeStateMac.mm.
414         (WebCore::ScrollingStateNode::platformScrollLayer):
415         (WebCore::ScrollingStateNode::setScrollLayer):
416         (WebCore):
417
418         Right now, the ScrollingStateScrollingNode is the only type of 
419         ScrollingStateNode. In the future there will be, for example, 
420         ScrollingStateFixedNodes that will have a different set of state 
421         information to keep track of.
422         * page/scrolling/ScrollingStateScrollingNode.cpp: Copied from page/scrolling/ScrollingTreeState.cpp.
423         (WebCore::ScrollingStateScrollingNode::create):
424         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
425         (WebCore):
426         (WebCore::ScrollingStateScrollingNode::~ScrollingStateScrollingNode):
427         (WebCore::ScrollingStateScrollingNode::cloneNode):
428         (WebCore::ScrollingStateScrollingNode::setViewportRect):
429         (WebCore::ScrollingStateScrollingNode::setContentsSize):
430         (WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion):
431         (WebCore::ScrollingStateScrollingNode::setWheelEventHandlerCount):
432         (WebCore::ScrollingStateScrollingNode::setShouldUpdateScrollLayerPositionOnMainThread):
433         (WebCore::ScrollingStateScrollingNode::setHorizontalScrollElasticity):
434         (WebCore::ScrollingStateScrollingNode::setVerticalScrollElasticity):
435         (WebCore::ScrollingStateScrollingNode::setHasEnabledHorizontalScrollbar):
436         (WebCore::ScrollingStateScrollingNode::setHasEnabledVerticalScrollbar):
437         (WebCore::ScrollingStateScrollingNode::setHorizontalScrollbarMode):
438         (WebCore::ScrollingStateScrollingNode::setVerticalScrollbarMode):
439         (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
440         (WebCore::ScrollingStateScrollingNode::setScrollOrigin):
441         * page/scrolling/ScrollingStateScrollingNode.h: Copied from page/scrolling/ScrollingTreeState.h.
442         (ScrollingStateScrollingNode):
443         * page/scrolling/ScrollingStateTree.cpp: Added.
444         (WebCore):
445         (WebCore::ScrollingStateTree::create):
446         (WebCore::ScrollingStateTree::ScrollingStateTree):
447         (WebCore::ScrollingStateTree::~ScrollingStateTree):
448         (WebCore::ScrollingStateTree::commit):
449
450         The ScrollingStateTree manages the nodes in the tree via the root 
451         node. It is responsible for cloning the tree and sending it over to 
452         the scrolling thread.
453         * page/scrolling/ScrollingStateTree.h: Added.
454         (WebCore):
455         (ScrollingStateTree):
456         (WebCore::ScrollingStateTree::rootStateNode):
457         (WebCore::ScrollingStateTree::setHasChangedProperties):
458         (WebCore::ScrollingStateTree::hasChangedProperties):
459         (WebCore::ScrollingStateTree::setRootStateNode):
460
461         Everything that used to refer to the ScrollingTreeState should now 
462         refer to the ScrollingStateTree instead. Right now, all of this code 
463         continues to deal with only the root node of the tree. In the future, 
464         it will have to deal with all of the nodes.
465         * page/scrolling/ScrollingTree.cpp:
466         (WebCore::ScrollingTree::commitNewTreeState):
467         * page/scrolling/ScrollingTree.h:
468         (WebCore):
469         * page/scrolling/ScrollingTreeNode.cpp:
470         (WebCore::ScrollingTreeNode::update):
471         * page/scrolling/ScrollingTreeNode.h:
472         (WebCore):
473         (ScrollingTreeNode):
474         * page/scrolling/mac/ScrollingTreeNodeMac.h:
475         (ScrollingTreeNodeMac):
476         * page/scrolling/mac/ScrollingTreeNodeMac.mm:
477         (WebCore::ScrollingTreeNodeMac::update):
478
479         ScrollingTreeState.cpp --> ScrollingStateScrollingNode.cpp
480         * page/scrolling/ScrollingTreeState.cpp: Removed.
481
482         ScrollingTreeState.h --> ScrollingStateScrollingNode.h
483         * page/scrolling/ScrollingTreeState.h: Removed.
484
485         ScrollingTreeStateMac.mm --> ScrollingStateNodeMac.mm
486         * page/scrolling/mac/ScrollingTreeStateMac.mm: Removed.
487
488 2012-10-01  Dimitri Glazkov  <dglazkov@chromium.org>
489
490         Kill transitive effects of SelectorChecker::checkOneSelector.
491         https://bugs.webkit.org/show_bug.cgi?id=97953
492
493         Reviewed by Eric Seidel.
494
495         The dynamicPseudo/hasUnknownPseudoelements by-ref parameters that are passed into checkOneSelector make the logic harder to understand and aren't needed. Refactor the code to rid of them, replacing them instead with two flags in SelectorCheckingContext.
496
497         No change in behavior, covered by existing tests.
498
499         * css/SelectorChecker.cpp:
500         (WebCore::SelectorChecker::checkSelector): Rolled pseudo-element-checking code out of checkOneSelector into here, since that is where t
501         (WebCore::SelectorChecker::checkOneSelector): Changed to use SelectorCheckingContext rather than transitive params.
502         * css/SelectorChecker.h:
503         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): Added two new flags.
504         (SelectorCheckingContext): Ditto.
505
506
507 2012-10-01  Andreas Kling  <kling@webkit.org>
508
509         349kB below SelectorDataList::initialize() on Membuster3.
510         <http://webkit.org/b/98072>
511         <rdar://problem/12408605>
512
513         Reviewed by Anders Carlsson.
514
515         Make a separate pass over the CSSSelectorList to figure out the capacity needed for SelectorDataList::m_selectors.
516         Reduces memory consumption by 322kB on Membuster3.
517
518         * dom/SelectorQuery.cpp:
519         (WebCore::SelectorDataList::initialize):
520
521 2012-10-01  Anders Carlsson  <andersca@apple.com>
522
523         Add a GraphicsLayerFactory getter to ChromeClient
524         https://bugs.webkit.org/show_bug.cgi?id=98069
525
526         Reviewed by Andreas Kling.
527
528         * page/ChromeClient.h:
529         (WebCore::ChromeClient::graphicsLayerFactory):
530         New function that can be overridden by ports to customize the layer type created for a page.
531
532         * rendering/RenderLayerCompositor.cpp:
533         (WebCore::RenderLayerCompositor::graphicsLayerFactory):
534         * rendering/RenderLayerCompositor.h:
535         Add helper getter that's unused for now but will be called by RenderLayerBacking when creating graphics layers.
536
537 2012-10-01  Ryosuke Niwa  <rniwa@webkit.org>
538
539         Rename AssertNoEventDispatch to NoEventDispatchAssertion
540         https://bugs.webkit.org/show_bug.cgi?id=98075
541
542         Reviewed by Abhishek Arya.
543
544         Renamed the class.
545
546         * dom/ContainerNode.cpp:
547         (WebCore):
548         (WebCore::ContainerNode::insertBeforeCommon):
549         (WebCore::ContainerNode::replaceChild):
550         (WebCore::ContainerNode::removeBetween):
551         (WebCore::ContainerNode::removeChildren):
552         (WebCore::ContainerNode::appendChild):
553         (WebCore::ContainerNode::parserAppendChild):
554         (WebCore::dispatchChildInsertionEvents):
555         (WebCore::dispatchChildRemovalEvents):
556         * dom/ContainerNode.h:
557         (WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
558         (WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion):
559         * dom/ContainerNodeAlgorithms.h:
560         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
561         (WebCore::ChildNodeInsertionNotifier::notify):
562         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
563         * dom/Document.cpp:
564         (WebCore::Document::dispatchWindowEvent):
565         (WebCore::Document::dispatchWindowLoadEvent):
566         * dom/EventDispatcher.cpp:
567         (WebCore::EventDispatcher::dispatchEvent):
568         * dom/EventTarget.cpp:
569         (WebCore::EventTarget::fireEventListeners):
570         * dom/Node.cpp:
571         (WebCore::Node::dispatchSubtreeModifiedEvent):
572         (WebCore::Node::dispatchFocusInEvent):
573         (WebCore::Node::dispatchFocusOutEvent):
574         (WebCore::Node::dispatchDOMActivateEvent):
575         * dom/WebKitNamedFlow.cpp:
576         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
577         * html/HTMLMediaElement.cpp:
578         (WebCore::HTMLMediaElement::loadInternal):
579
580 2012-10-01  Stephen Chenney  <schenney@chromium.org>
581
582         Rename Font::m_fontList to avoid confusion
583         https://bugs.webkit.org/show_bug.cgi?id=95867
584
585         Reviewed by Eric Seidel.
586
587        Renames Font::m_fontList to Font::m_fontFallbackList to avoid confusion
588        with FontFallbackList::m_fontList.
589
590         No new tests as behavior is absolutely not different.
591
592         * platform/graphics/Font.cpp:
593         (WebCore::Font::Font):
594         (WebCore::Font::operator=):
595         (WebCore::Font::operator==):
596         (WebCore::Font::update):
597         * platform/graphics/Font.h:
598         (WebCore::Font::fontList):
599         (WebCore::Font::loadingCustomFonts):
600         (Font):
601         (WebCore::Font::primaryFont):
602         (WebCore::Font::fontDataAt):
603         (WebCore::Font::isFixedPitch):
604         (WebCore::Font::fontSelector):
605         * platform/graphics/FontFastPath.cpp:
606         (WebCore::Font::glyphDataAndPageForCharacter):
607
608 2012-10-01  Florin Malita  <fmalita@chromium.org>
609
610         Refactor layer-related logic out of RenderBoxModelObject
611         https://bugs.webkit.org/show_bug.cgi?id=86022
612
613         Reviewed by David Hyatt.
614
615         This patch extracts layer-related logic into a dedicated class
616         (RenderLayerModelObject) and refactors dependent code to make use
617         of the new type instead of RenderBoxModelObject. This is in preparation
618         of adding non-RenderBoxModelObject layer supprt.
619
620         All methods that were using RenderBoxModelObject for layer-related
621         functionality are updated to work with RenderLayerModelObject
622         instead (a RenderLayer's renderer() can no longer be assumed to be
623         a RenderBoxModelObject).
624
625         No new tests: refactoring with no behavior changes.
626
627         * CMakeLists.txt:
628         * GNUmakefile.list.am:
629         * Target.pri:
630         * WebCore.exp.in:
631         * WebCore.gypi:
632         * WebCore.order:
633         * WebCore.vcproj/WebCore.vcproj:
634         * WebCore.xcodeproj/project.pbxproj:
635         * rendering/LayoutRepainter.h:
636         (WebCore):
637         (LayoutRepainter):
638         * rendering/RenderBR.h:
639         * rendering/RenderBlock.cpp:
640         (WebCore::RenderBlock::selectionGapRectsForRepaint):
641         (WebCore::RenderBlock::rectWithOutlineForRepaint):
642         * rendering/RenderBlock.h:
643         (RenderBlock):
644         * rendering/RenderBox.cpp:
645         (WebCore::RenderBox::styleDidChange):
646         (WebCore::RenderBox::updateFromStyle):
647         (WebCore::RenderBox::outlineBoundsForRepaint):
648         (WebCore::RenderBox::mapLocalToContainer):
649         (WebCore::RenderBox::pushMappingToContainer):
650         (WebCore::RenderBox::clippedOverflowRectForRepaint):
651         (WebCore::RenderBox::computeRectForRepaint):
652         (WebCore::RenderBox::enclosingFloatPaintingLayer):
653         * rendering/RenderBox.h:
654         (RenderBox):
655         * rendering/RenderBoxModelObject.cpp:
656         (WebCore):
657         (WebCore::RenderBoxModelObject::RenderBoxModelObject):
658         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
659         (WebCore::RenderBoxModelObject::willBeDestroyed):
660         (WebCore::RenderBoxModelObject::updateFromStyle):
661         * rendering/RenderBoxModelObject.h:
662         (RenderBoxModelObject):
663         * rendering/RenderGeometryMap.cpp:
664         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
665         (WebCore::RenderGeometryMap::popMappingsToAncestor):
666         * rendering/RenderGeometryMap.h:
667         (RenderGeometryMap):
668         * rendering/RenderInline.cpp:
669         (WebCore::RenderInline::updateFromStyle):
670         (WebCore::RenderInline::clippedOverflowRectForRepaint):
671         (WebCore::RenderInline::rectWithOutlineForRepaint):
672         (WebCore::RenderInline::computeRectForRepaint):
673         (WebCore::RenderInline::mapLocalToContainer):
674         (WebCore::RenderInline::pushMappingToContainer):
675         * rendering/RenderInline.h:
676         (RenderInline):
677         * rendering/RenderLayer.cpp:
678         (WebCore::RenderLayer::RenderLayer):
679         (WebCore::RenderLayer::updateLayerPositions):
680         (WebCore::RenderLayer::computeRepaintRects):
681         (WebCore::checkContainingBlockChainForPagination):
682         (WebCore::RenderLayer::updateLayerPosition):
683         (WebCore::isPositionedContainer):
684         (WebCore::RenderLayer::hasAncestorWithFilterOutsets):
685         (WebCore::RenderLayer::scrollTo):
686         (WebCore::RenderLayer::repaintIncludingNonCompositingDescendants):
687         * rendering/RenderLayer.h:
688         (RenderLayer):
689         (WebCore::RenderLayer::renderer):
690         * rendering/RenderLayerBacking.h:
691         (WebCore::RenderLayerBacking::renderer):
692         * rendering/RenderLayerCompositor.cpp:
693         (WebCore::RenderLayerCompositor::updateBacking):
694         (WebCore::RenderLayerCompositor::repaintOnCompositingChange):
695         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
696         (WebCore::RenderLayerCompositor::reasonForCompositing):
697         * rendering/RenderListMarker.cpp:
698         (WebCore::RenderListMarker::selectionRectForRepaint):
699         * rendering/RenderListMarker.h:
700         (RenderListMarker):
701         * rendering/RenderObject.cpp:
702         (WebCore::RenderObject::addChild):
703         (WebCore::addLayers):
704         (WebCore::RenderObject::removeLayers):
705         (WebCore::RenderObject::moveLayers):
706         (WebCore::RenderObject::findNextLayer):
707         (WebCore::RenderObject::enclosingLayer):
708         (WebCore::RenderObject::setLayerNeedsFullRepaint):
709         (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
710         (WebCore::RenderObject::containerForRepaint):
711         (WebCore::RenderObject::repaintUsingContainer):
712         (WebCore::RenderObject::repaint):
713         (WebCore::RenderObject::repaintRectangle):
714         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
715         (WebCore::RenderObject::rectWithOutlineForRepaint):
716         (WebCore::RenderObject::clippedOverflowRectForRepaint):
717         (WebCore::RenderObject::computeRectForRepaint):
718         (WebCore::RenderObject::computeFloatRectForRepaint):
719         (WebCore::RenderObject::adjustStyleDifference):
720         (WebCore::RenderObject::mapLocalToContainer):
721         (WebCore::RenderObject::pushMappingToContainer):
722         (WebCore::RenderObject::shouldUseTransformFromContainer):
723         (WebCore::RenderObject::getTransformFromContainer):
724         (WebCore::RenderObject::localToContainerQuad):
725         (WebCore::RenderObject::localToContainerPoint):
726         (WebCore::RenderObject::container):
727         (WebCore::RenderObject::willBeDestroyed):
728         (WebCore::RenderObject::isComposited):
729         * rendering/RenderObject.h:
730         (WebCore):
731         (WebCore::RenderObject::isLayerModelObject):
732         (RenderObject):
733         (WebCore::RenderObject::selectionRectForRepaint):
734         (WebCore::RenderObject::outlineBoundsForRepaint):
735         * rendering/RenderReplaced.cpp:
736         (WebCore::RenderReplaced::selectionRectForRepaint):
737         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
738         * rendering/RenderReplaced.h:
739         (RenderReplaced):
740         * rendering/RenderSelectionInfo.h:
741         (WebCore::RenderSelectionInfoBase::repaintContainer):
742         (RenderSelectionInfoBase):
743         * rendering/RenderTableCell.cpp:
744         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
745         (WebCore::RenderTableCell::computeRectForRepaint):
746         * rendering/RenderTableCell.h:
747         (RenderTableCell):
748         * rendering/RenderTableCol.cpp:
749         (WebCore::RenderTableCol::clippedOverflowRectForRepaint):
750         * rendering/RenderTableCol.h:
751         (RenderTableCol):
752         * rendering/RenderTableRow.cpp:
753         (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
754         * rendering/RenderTableRow.h:
755         (RenderTableRow):
756         * rendering/RenderText.cpp:
757         (WebCore::RenderText::clippedOverflowRectForRepaint):
758         (WebCore::RenderText::selectionRectForRepaint):
759         * rendering/RenderText.h:
760         (RenderText):
761         * rendering/RenderLayerModelObject.cpp: Added.
762         (WebCore):
763         (WebCore::RenderLayerModelObject::RenderLayerModelObject):
764         (WebCore::RenderLayerModelObject::~RenderLayerModelObject):
765         (WebCore::RenderLayerModelObject::destroyLayer):
766         (WebCore::RenderLayerModelObject::ensureLayer):
767         (WebCore::RenderLayerModelObject::hasSelfPaintingLayer):
768         (WebCore::RenderLayerModelObject::willBeDestroyed):
769         (WebCore::RenderLayerModelObject::styleWillChange):
770         (WebCore::RenderLayerModelObject::styleDidChange):
771         * rendering/RenderLayerModelObject.h: Added.
772         (WebCore):
773         (RenderLayerModelObject):
774         (WebCore::RenderLayerModelObject::layer):
775         (WebCore::RenderLayerModelObject::updateFromStyle):
776         (WebCore::toRenderLayerModelObject):
777         * rendering/RenderView.cpp:
778         (WebCore::RenderView::mapLocalToContainer):
779         (WebCore::RenderView::pushMappingToContainer):
780         (WebCore::isComposited):
781         (WebCore::RenderView::computeRectForRepaint):
782         (WebCore::RenderView::absoluteRects):
783         (WebCore::RenderView::absoluteQuads):
784         (WebCore::RenderView::selectionBounds):
785         (WebCore::RenderView::setSelection):
786         (WebCore::RenderView::clearSelection):
787         * rendering/RenderView.h:
788         (RenderView):
789         * rendering/RenderingAllInOne.cpp:
790         * rendering/svg/RenderSVGBlock.cpp:
791         (WebCore::RenderSVGBlock::updateFromStyle):
792         * rendering/svg/RenderSVGBlock.h:
793         (RenderSVGBlock):
794         * rendering/svg/RenderSVGForeignObject.cpp:
795         (WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint):
796         (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
797         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
798         (WebCore::RenderSVGForeignObject::pushMappingToContainer):
799         * rendering/svg/RenderSVGForeignObject.h:
800         (RenderSVGForeignObject):
801         * rendering/svg/RenderSVGGradientStop.h:
802         * rendering/svg/RenderSVGHiddenContainer.h:
803         * rendering/svg/RenderSVGInline.cpp:
804         (WebCore::RenderSVGInline::clippedOverflowRectForRepaint):
805         (WebCore::RenderSVGInline::computeFloatRectForRepaint):
806         (WebCore::RenderSVGInline::mapLocalToContainer):
807         (WebCore::RenderSVGInline::pushMappingToContainer):
808         * rendering/svg/RenderSVGInline.h:
809         (RenderSVGInline):
810         * rendering/svg/RenderSVGModelObject.cpp:
811         (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint):
812         (WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
813         (WebCore::RenderSVGModelObject::mapLocalToContainer):
814         (WebCore::RenderSVGModelObject::pushMappingToContainer):
815         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
816         * rendering/svg/RenderSVGModelObject.h:
817         (RenderSVGModelObject):
818         * rendering/svg/RenderSVGRoot.cpp:
819         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
820         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
821         (WebCore::RenderSVGRoot::mapLocalToContainer):
822         (WebCore::RenderSVGRoot::pushMappingToContainer):
823         * rendering/svg/RenderSVGRoot.h:
824         (RenderSVGRoot):
825         * rendering/svg/RenderSVGText.cpp:
826         (WebCore::RenderSVGText::clippedOverflowRectForRepaint):
827         (WebCore::RenderSVGText::computeRectForRepaint):
828         (WebCore::RenderSVGText::computeFloatRectForRepaint):
829         (WebCore::RenderSVGText::mapLocalToContainer):
830         (WebCore::RenderSVGText::pushMappingToContainer):
831         * rendering/svg/RenderSVGText.h:
832         (RenderSVGText):
833         * rendering/svg/SVGRenderSupport.cpp:
834         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
835         (WebCore::SVGRenderSupport::computeFloatRectForRepaint):
836         (WebCore::SVGRenderSupport::mapLocalToContainer):
837         (WebCore::SVGRenderSupport::pushMappingToContainer):
838         * rendering/svg/SVGRenderSupport.h:
839         (WebCore):
840         (SVGRenderSupport):
841
842 2012-10-01  Stephen Chenney  <schenney@chromium.org>
843
844         Refactor WebCore::FontData handling to clarify pointer ownership
845         https://bugs.webkit.org/show_bug.cgi?id=95866
846
847         Reviewed by Eric Seidel.
848
849         This patch makes all FontData and derived classes ref-counted in all
850         code paths that lead to caching or other retention of a
851         pointer. The goal is to avert crashes and memory leaks, and to bring
852         the code more in line with current WebKit practices.
853
854         Specifically, this patch allows us to use ref pointers for all the
855         FontData stored in FontFallbackList objects. The FontFallbackList can
856         then own custom font data and manage its lifetime (forthcoming patch).
857         Currently Document owns custom font data and does an end run around
858         FontFallbackList in deleting glyph pages and custom font data, leaving
859         FontFallbackList with invalid pointers.
860
861         All FontData derived classes have been switched to use static create
862         methods with private constructors.
863
864         All caches that hold FontData now use RefPtrs.
865
866         All methods that construct new font data now return PassRefPtr, with the
867         exception of code only used to generate temporary data for text run layout.
868
869         All methods that handle FontData in a call stack that passes through
870         FontFallbackList::fontDataAt return PassRefPtr.
871
872         Performance tested with both WebKit Perf-o-matic, which showed
873         performance changes in the noise, and Chrome's page cycling tests with
874         the acid3 benchmark set, which showed no performance difference at all.
875
876         No new tests as this is refactoring code only and has no impact on functionality.
877
878         * css/CSSFontFace.cpp:
879         (WebCore::CSSFontFace::getFontData):
880         * css/CSSFontFace.h:
881         (CSSFontFace):
882         * css/CSSFontFaceSource.cpp:
883         (WebCore::CSSFontFaceSource::getFontData):
884         * css/CSSFontFaceSource.h:
885         (CSSFontFaceSource):
886         * css/CSSFontSelector.cpp:
887         (WebCore::fontDataForGenericFamily):
888         (WebCore::CSSFontSelector::getFontData):
889         * css/CSSFontSelector.h:
890         * css/CSSSegmentedFontFace.cpp:
891         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
892         (WebCore::CSSSegmentedFontFace::getFontData):
893         * css/CSSSegmentedFontFace.h:
894         (CSSSegmentedFontFace):
895         * dom/Document.cpp:
896         (WebCore::Document::registerCustomFont):
897         * dom/Document.h:
898         (Document):
899         * platform/graphics/Font.h:
900         (WebCore):
901         * platform/graphics/FontCache.cpp:
902         (WebCore):
903         (WebCore::FontCache::getCachedFontData):
904         (WebCore::FontCache::getNonRetainedLastResortFallbackFont):
905         (WebCore::FontCache::releaseFontData):
906         (WebCore::FontCache::purgeInactiveFontData):
907         (WebCore::FontCache::getFontData):
908         * platform/graphics/FontCache.h:
909         (FontCache):
910         * platform/graphics/FontData.h:
911         * platform/graphics/FontFallbackList.cpp:
912         (WebCore::FontFallbackList::releaseFontData):
913         (WebCore::FontFallbackList::fontDataAt):
914         (WebCore::FontFallbackList::setPlatformFont):
915         * platform/graphics/FontFallbackList.h:
916         (FontFallbackList):
917         * platform/graphics/FontFastPath.cpp:
918         (WebCore::Font::glyphDataAndPageForCharacter):
919         * platform/graphics/FontSelector.h:
920         (FontSelector):
921         * platform/graphics/GlyphPageTreeNode.cpp:
922         (WebCore::GlyphPageTreeNode::initializePage):
923         * platform/graphics/SegmentedFontData.cpp:
924         (WebCore::SegmentedFontData::fontDataForCharacter):
925         * platform/graphics/SegmentedFontData.h:
926         (WebCore::FontDataRange::FontDataRange):
927         (WebCore::FontDataRange::fontData):
928         (FontDataRange):
929         (WebCore::SegmentedFontData::create):
930         (SegmentedFontData):
931         (WebCore::SegmentedFontData::SegmentedFontData):
932         * platform/graphics/SimpleFontData.cpp:
933         (WebCore::SimpleFontData::verticalRightOrientationFontData):
934         (WebCore::SimpleFontData::uprightOrientationFontData):
935         (WebCore::SimpleFontData::brokenIdeographFontData):
936         * platform/graphics/SimpleFontData.h:
937         (WebCore::SimpleFontData::create):
938         (SimpleFontData):
939         (WebCore::SimpleFontData::variantFontData):
940         (DerivedFontData):
941         * platform/graphics/chromium/FontCacheAndroid.cpp:
942         (WebCore::FontCache::getFontDataForCharacters):
943         (WebCore::FontCache::getSimilarFontPlatformData):
944         (WebCore::FontCache::getLastResortFallbackFont):
945         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
946         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
947         (GetLastResortFallbackFontProcData):
948         (WebCore::FontCache::getFontDataForCharacters):
949         (WebCore::FontCache::getSimilarFontPlatformData):
950         (WebCore::FontCache::getLastResortFallbackFont):
951         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
952         (WebCore::SimpleFontData::createScaledFontData):
953         (WebCore::SimpleFontData::smallCapsFontData):
954         (WebCore::SimpleFontData::emphasisMarkFontData):
955         * platform/graphics/freetype/FontCacheFreeType.cpp:
956         (WebCore::FontCache::getFontDataForCharacters):
957         (WebCore::FontCache::getSimilarFontPlatformData):
958         (WebCore::FontCache::getLastResortFallbackFont):
959         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
960         (WebCore::SimpleFontData::createScaledFontData):
961         (WebCore::SimpleFontData::smallCapsFontData):
962         (WebCore::SimpleFontData::emphasisMarkFontData):
963         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
964         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
965         * platform/graphics/mac/FontCacheMac.mm:
966         (WebCore::FontCache::getFontDataForCharacters):
967         (WebCore::FontCache::getSimilarFontPlatformData):
968         (WebCore::FontCache::getLastResortFallbackFont):
969         * platform/graphics/mac/FontComplexTextMac.cpp:
970         (WebCore::Font::fontDataForCombiningCharacterSequence):
971         * platform/graphics/mac/SimpleFontDataMac.mm:
972         (WebCore::SimpleFontData::platformDestroy):
973         (WebCore::SimpleFontData::createScaledFontData):
974         (WebCore::SimpleFontData::smallCapsFontData):
975         (WebCore::SimpleFontData::emphasisMarkFontData):
976         * platform/graphics/pango/FontCachePango.cpp:
977         (WebCore::FontCache::getFontDataForCharacters):
978         (WebCore::FontCache::getSimilarFontPlatformData):
979         (WebCore::FontCache::getLastResortFallbackFont):
980         * platform/graphics/pango/SimpleFontDataPango.cpp:
981         (WebCore::SimpleFontData::createScaledFontData):
982         (WebCore::SimpleFontData::smallCapsFontData):
983         (WebCore::SimpleFontData::emphasisMarkFontData):
984         * platform/graphics/qt/FontCacheQt.cpp:
985         (WebCore::FontCache::getFontDataForCharacters):
986         (WebCore::FontCache::getSimilarFontPlatformData):
987         (WebCore::FontCache::getLastResortFallbackFont):
988         * platform/graphics/qt/SimpleFontDataQt.cpp:
989         (WebCore::SimpleFontData::createScaledFontData):
990         (WebCore::SimpleFontData::smallCapsFontData):
991         (WebCore::SimpleFontData::emphasisMarkFontData):
992         * platform/graphics/skia/FontCacheSkia.cpp:
993         (WebCore::FontCache::getFontDataForCharacters):
994         (WebCore::FontCache::getSimilarFontPlatformData):
995         (WebCore::FontCache::getLastResortFallbackFont):
996         * platform/graphics/skia/SimpleFontDataSkia.cpp:
997         (WebCore::SimpleFontData::createScaledFontData):
998         (WebCore::SimpleFontData::smallCapsFontData):
999         (WebCore::SimpleFontData::emphasisMarkFontData):
1000         * platform/graphics/win/FontCacheWin.cpp:
1001         (WebCore::FontCache::getFontDataForCharacters):
1002         (WebCore::FontCache::getSimilarFontPlatformData):
1003         (WebCore::FontCache::fontDataFromDescriptionAndLogFont):
1004         (WebCore::FontCache::getLastResortFallbackFont):
1005         * platform/graphics/win/SimpleFontDataWin.cpp:
1006         (WebCore::SimpleFontData::createScaledFontData):
1007         (WebCore::SimpleFontData::smallCapsFontData):
1008         (WebCore::SimpleFontData::emphasisMarkFontData):
1009         * platform/graphics/wince/FontCacheWinCE.cpp:
1010         (WebCore::FontCache::getFontDataForCharacters):
1011         (WebCore::FontCache::getSimilarFontPlatformData):
1012         (WebCore::FontCache::getLastResortFallbackFont):
1013         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
1014         (WebCore::SimpleFontData::createScaledFontData):
1015         (WebCore::SimpleFontData::smallCapsFontData):
1016         (WebCore::SimpleFontData::emphasisMarkFontData):
1017         * platform/graphics/wx/FontCacheWx.cpp:
1018         (WebCore::FontCache::getFontDataForCharacters):
1019         (WebCore::FontCache::getSimilarFontPlatformData):
1020         (WebCore::FontCache::getLastResortFallbackFont):
1021         * platform/graphics/wx/SimpleFontDataWx.cpp:
1022         (WebCore::SimpleFontData::createScaledFontData):
1023         (WebCore::SimpleFontData::smallCapsFontData):
1024         (WebCore::SimpleFontData::emphasisMarkFontData):
1025
1026 2012-10-01  Ryosuke Niwa  <rniwa@webkit.org>
1027
1028         Turn forbidEventDispatch and allowEventDispatch into a RAII object
1029         https://bugs.webkit.org/show_bug.cgi?id=96717
1030
1031         Reviewed by Abhishek Arya.
1032
1033         Replaced forbidEventDispatch and allowEventDispatch by AssertNoEventDispatch.
1034
1035         * dom/ContainerNode.cpp:
1036         (WebCore):
1037         (WebCore::ContainerNode::insertBeforeCommon):
1038         (WebCore::ContainerNode::replaceChild):
1039         (WebCore::ContainerNode::removeBetween):
1040         (WebCore::ContainerNode::removeChildren):
1041         (WebCore::ContainerNode::appendChild):
1042         (WebCore::ContainerNode::parserAddChild):
1043         (WebCore::dispatchChildInsertionEvents):
1044         (WebCore::dispatchChildRemovalEvents):
1045         * dom/ContainerNode.h:
1046         (AssertNoEventDispatch):
1047         (WebCore::AssertNoEventDispatch::AssertNoEventDispatch):
1048         (WebCore::AssertNoEventDispatch::~AssertNoEventDispatch):
1049         (WebCore::AssertNoEventDispatch::isEventDispatchForbidden):
1050         (WebCore):
1051         * dom/ContainerNodeAlgorithms.h:
1052         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
1053         (WebCore::ChildNodeInsertionNotifier::notify):
1054         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
1055         * dom/Document.cpp:
1056         (WebCore::Document::dispatchWindowEvent):
1057         (WebCore::Document::dispatchWindowLoadEvent):
1058         * dom/EventDispatcher.cpp:
1059         (WebCore::EventDispatcher::dispatchEvent):
1060         * dom/EventTarget.cpp:
1061         (WebCore):
1062         (WebCore::EventTarget::fireEventListeners):
1063         * dom/EventTarget.h:
1064         (WebCore):
1065         * dom/Node.cpp:
1066         (WebCore::Node::dispatchSubtreeModifiedEvent):
1067         (WebCore::Node::dispatchFocusInEvent):
1068         (WebCore::Node::dispatchFocusOutEvent):
1069         (WebCore::Node::dispatchDOMActivateEvent):
1070         * dom/WebKitNamedFlow.cpp:
1071         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
1072         * html/HTMLMediaElement.cpp:
1073         (WebCore::HTMLMediaElement::loadInternal):
1074
1075 2012-10-01  Anders Carlsson  <andersca@apple.com>
1076
1077         Would like a way to customize the type of GraphicsLayers created on a per page basis
1078         https://bugs.webkit.org/show_bug.cgi?id=98051
1079
1080         Reviewed by Simon Fraser.
1081
1082         Add a GraphicsLayerFactory abstract class and a new GraphicsLayer::create overload that takes
1083         a factory object. Eventually, all calls to the old GraphicsLayer::create will be replaced with
1084         the new version that takes an optional factory.
1085
1086         * WebCore.xcodeproj/project.pbxproj:
1087         * platform/graphics/GraphicsLayer.h:
1088         (WebCore):
1089         (GraphicsLayer):
1090         * platform/graphics/GraphicsLayerFactory.h: Added.
1091         (WebCore):
1092         (GraphicsLayerFactory):
1093         (WebCore::GraphicsLayerFactory::~GraphicsLayerFactory):
1094         * platform/graphics/ca/GraphicsLayerCA.cpp:
1095         (WebCore::GraphicsLayer::create):
1096         (WebCore):
1097
1098 2012-10-01  Adam Klein  <adamk@chromium.org>
1099
1100         Consolidate more MutationObserverRegistration logic in Node
1101         https://bugs.webkit.org/show_bug.cgi?id=98058
1102
1103         Reviewed by Ryosuke Niwa.
1104
1105         One remaining oddity of Node's MutationObserver-related interface was
1106         that registerMutationObserver returned the resulting MutationObserverRegistration
1107         object.
1108
1109         Instead, Node now internally handles resetting the observation
1110         if the registration already exists, and updating the Document's list of
1111         mutation observer types.
1112
1113         No change in behavior, refactoring only.
1114
1115         * dom/MutationObserver.cpp:
1116         (WebCore::MutationObserver::observe): Simplified to just call
1117         Node::registerMutationObserver; nothing else is needed.
1118         * dom/MutationObserverRegistration.cpp:
1119         (WebCore::MutationObserverRegistration::create): Take options and attributeFilter,
1120         avoiding an unnecessary call to resetObservation().
1121         (WebCore::MutationObserverRegistration::MutationObserverRegistration): ditto
1122         * dom/MutationObserverRegistration.h:
1123         (MutationObserverRegistration):
1124         * dom/Node.cpp:
1125         (WebCore::Node::registerMutationObserver): Handle observation
1126         resetting if that observer's already registered, and update the list
1127         of active MutationObserver types in the Document.
1128         * dom/Node.h:
1129         (Node):
1130
1131 2012-10-01  Glenn Adams  <glenn@skynav.com>
1132
1133         YYDEBUG doesn't print token values
1134         https://bugs.webkit.org/show_bug.cgi?id=97896
1135
1136         Reviewed by Simon Fraser.
1137
1138         Define YYPRINT macro to print token values when YYDEBUG is set.
1139
1140         No new tests. For CSS lexer/parser debug usage only.
1141
1142         * css/CSSGrammar.y:
1143         Define YYPRINT macro to output IDENT and STRING typed tokens. Others can be added
1144         in the future.
1145
1146 2012-10-01  Jochen Eisinger  <jochen@chromium.org>
1147
1148         [chromium] ASSERT that the embedder has set a default locale
1149         https://bugs.webkit.org/show_bug.cgi?id=98001
1150
1151         Reviewed by Adam Barth.
1152
1153         The callsites assume that the default language is always defined, e.g.
1154         Document::getCachedLocalizer. Add an ASSERT() statement so an embedder
1155         doesn't have to guess what they did wrong.
1156
1157         * platform/chromium/LanguageChromium.cpp:
1158         (WebCore::platformLanguage):
1159
1160 2012-10-01  Christophe Dumez  <christophe.dumez@intel.com>
1161
1162         Fix compilation warnings
1163         https://bugs.webkit.org/show_bug.cgi?id=98020
1164
1165         Reviewed by Gyuyoung Kim.
1166
1167         Fix compilation warnings in PluginView code.
1168
1169         No new tests, no behavior change.
1170
1171         * plugins/PluginView.cpp:
1172         (WebCore::PluginView::newStream):
1173         (WebCore::PluginView::write):
1174         (WebCore::PluginView::getAuthenticationInfo):
1175         * plugins/efl/PluginViewEfl.cpp:
1176         (WebCore::PluginView::setNPWindowRect):
1177         (WebCore::PluginView::invalidateRegion):
1178
1179 2012-10-01  Arpita Bahuguna  <arpitabahuguna@gmail.com>
1180
1181         RenderBlock incorrectly calculates pref width when a replaced object follows a RenderInline with width
1182         https://bugs.webkit.org/show_bug.cgi?id=84624
1183
1184         Reviewed by Levi Weintraub.
1185
1186         For the specific scenario, wherein an inline replaced element (image)
1187         follows an inline flow object within a render block, we should allow
1188         for that block to grow to accomodate the replaced element so as to
1189         avoid it's overflow.
1190
1191         This quirk is handled well by other browsers.
1192
1193         Test: fast/block/block-with-inline-replaced-child.html
1194
1195         * rendering/RenderBlock.cpp:
1196         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1197         We should not cause our line to break for the scenario wherein an inline
1198         replaced element follows an inline flow object.
1199
1200         For handling the same have introduced a flag: isPrevChildInlineFlow which
1201         shall be set for an inline flow element.
1202         Based on this, while handling the inline replaced elements, we either
1203         terminate the line (for minWidth calculation) or not depending upon
1204         this flag.
1205
1206 2012-10-01  Yury Semikhatsky  <yurys@chromium.org>
1207
1208         Unreviewed. Chromium build fix.
1209
1210         * bindings/v8/V8DOMMap.h: included Node.h as reportMemoryUsage now uses Node definition.
1211
1212 2012-10-01  Yury Semikhatsky  <yurys@chromium.org>
1213
1214         Web Inspector: provide memory instrumentation for HashMap
1215         https://bugs.webkit.org/show_bug.cgi?id=98005
1216
1217         Reviewed by Pavel Feldman.
1218
1219         Updated all call sites of MemoryInstrumentation::addHashMap to use generic
1220         method of reporting memory footprint instead. 
1221
1222         * bindings/v8/ScopedDOMDataStore.cpp:
1223         * bindings/v8/V8Binding.cpp:
1224         (WebCore::StringCache::reportMemoryUsage):
1225         * bindings/v8/V8DOMMap.h:
1226         * bindings/v8/V8PerIsolateData.cpp:
1227         (WebCore::V8PerIsolateData::reportMemoryUsage):
1228         * css/CSSImageGeneratorValue.cpp:
1229         (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
1230         * css/PropertySetCSSStyleDeclaration.cpp:
1231         (WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
1232         * css/StyleResolver.cpp:
1233         (WebCore::StyleResolver::collectMatchingRulesForList):
1234         * css/StyleSheetContents.cpp:
1235         (WebCore::StyleSheetContents::reportMemoryUsage):
1236         * dom/Document.cpp:
1237         (WebCore::Document::reportMemoryUsage):
1238         * loader/DocumentLoader.cpp:
1239         (WebCore::DocumentLoader::reportMemoryUsage):
1240         * loader/cache/CachedResourceLoader.cpp:
1241         (WebCore::CachedResourceLoader::reportMemoryUsage):
1242         * loader/cache/MemoryCache.cpp:
1243         (WebCore::MemoryCache::reportMemoryUsage):
1244         * platform/network/ResourceRequestBase.cpp:
1245         (WebCore::ResourceRequestBase::reportMemoryUsage):
1246         * platform/network/ResourceResponseBase.cpp:
1247         (WebCore::ResourceResponseBase::reportMemoryUsage):
1248         * rendering/style/StyleRareNonInheritedData.cpp:
1249
1250 2012-10-01  Yury Semikhatsky  <yurys@chromium.org>
1251
1252         Put implementation details of StyleBuilder.cpp into anonymous namespace
1253         https://bugs.webkit.org/show_bug.cgi?id=98028
1254
1255         Reviewed by Pavel Feldman.
1256
1257         All types that are declared and used only inside StyleBuilder were moved
1258         into anonymous namespace to avoid name conflicts with the rest of WebCore.
1259
1260         * css/StyleBuilder.cpp:
1261         (WebCore::StyleBuilder::StyleBuilder): renamed BorderImageType::Image into BorderImageType::BorderImage
1262         as otherwise there is an ambiguity at placess where setPropertyHandler is called.
1263
1264 2012-10-01  Andrei Bucur  <abucur@adobe.com>
1265
1266         [CSS Regions] Remove the deprecated API Document.webkitGetFlowByName
1267         https://bugs.webkit.org/show_bug.cgi?id=97657
1268
1269         Reviewed by Andreas Kling.
1270
1271         The Document.getFlowByName() API has been deprecated in favor of the NamedFlowCollection.namedItem(DOMString).
1272         Link to spec: http://www.w3.org/TR/css3-regions/#the-namedflow-interface
1273
1274         Tests: The old tests have been adapted to use the new API.
1275
1276         * dom/Document.cpp:
1277         (WebCore):
1278         * dom/Document.h:
1279         (Document):
1280         * dom/Document.idl:
1281
1282 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1283
1284         Make sure that the history position is applied correctly when using delegatesScrolling
1285         https://bugs.webkit.org/show_bug.cgi?id=97778
1286
1287         Reviewed by Kenneth Rohde Christiansen.
1288
1289         The position is applied asynchronously and the UI process is the one holding the current
1290         state. For this reason we can't rely in WebCore on ScrollView::scrollPosition holding
1291         the current position in that case.
1292
1293         * page/Page.cpp:
1294         (WebCore::Page::setPageScaleFactor):
1295
1296 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1297
1298         [Qt] Decide when to apply a scrolled position to the viewport based on the rect covered by the tiles
1299         https://bugs.webkit.org/show_bug.cgi?id=97777
1300
1301         Reviewed by Kenneth Rohde Christiansen.
1302
1303         * platform/graphics/TiledBackingStore.cpp:
1304         (WebCore::TiledBackingStore::createTiles):
1305         * platform/graphics/TiledBackingStore.h:
1306         (WebCore::TiledBackingStore::coverRect):
1307         (WebCore::TiledBackingStore::setCoverRect):
1308         (TiledBackingStore):
1309
1310 2012-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
1311
1312         Unreviewed. Fix make distcheck.
1313
1314         * GNUmakefile.list.am: ClipPathOperation.h was moved.
1315
1316 2012-10-01  Arko Saha  <arko@motorola.com>
1317
1318         Microdata: names.item() must return null for out of range indexes.
1319         https://bugs.webkit.org/show_bug.cgi?id=97898
1320
1321         Reviewed by Kentaro Hara.
1322
1323         DOMStringList.item() must return null for an invalid index.
1324         Spec: http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList
1325         Removed [IsIndex] extended IDL attribute from item() method's index
1326         parameter in DOMStringList interface.
1327         Firefox and Opera's behavior is consistent with the spec. Both
1328         returns null for invalid index.
1329
1330         Test: fast/dom/MicroData/names-item-out-of-range-index.html
1331
1332         * dom/DOMStringList.idl:
1333
1334 2012-10-01  Yoshifumi Inoue  <yosin@chromium.org>
1335
1336         [Forms] Multiple fields week input UI
1337         https://bugs.webkit.org/show_bug.cgi?id=97877
1338
1339         Reviewed by Kent Tamura.
1340
1341         This patch introduces multiple fields "week" input UI in DRT. We'll
1342         enable this feature once we add tests.
1343
1344         Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_WEEK
1345         and ENABLE_INPUT_MULTIPLE_FIELDS_UI.
1346
1347         No new tests. To reduce size of this patch, other patches add tests
1348         for multiple fields week input UI.
1349
1350         Note: Actual outputs of two tests
1351           - fast/forms/week/week-input-visible-string.html
1352           - fast/forms/week/week-stepup-stepdown-from-renderer.html
1353         are different.
1354
1355         * css/thml.css:
1356         (input::-webkit-datetime-edit-week-field): Added for field appearance.
1357         (input::-webkit-datetime-edit-week-field:focus): Added to remove focus ring.
1358         * html/WeekInputType.cpp:
1359         (WebCore::WeekInputType::formatDateTimeFieldsState): Added to format numeric value to string value as specified in HTML5 specification.
1360         (WebCore::WeekInputType::setupLayoutParameters):  Added to set layout of multiple fields.
1361         * html/WeekInputType.h: Changed to include BaseMultipleFieldsDateAndTimeInputType.h and introduce BaseWeekInputType typedef.
1362         (WebCore::WeekInputType::WeekInputType): Changed base class name to BaseWeekInputType.
1363         (WeekInputType): Changed to add declarations for formatDateTimeFieldsState() and setupLayoutParameters().
1364         * html/shadow/DateTimeEditElement.cpp:
1365         (WebCore::DateTimeEditBuilder::visitField): Changed to support week field.
1366
1367 2012-10-01  Pavel Feldman  <pfeldman@chromium.org>
1368
1369         Web Inspector: do not use InspectorInstrumentation::hasFrontends() check when collecting stacks
1370         https://bugs.webkit.org/show_bug.cgi?id=96730
1371
1372         Reviewed by Vsevolod Vlasov.
1373
1374         - Introduced InspectorInstrumentation::console|timeline|runtime|canvasAgentEnabled
1375         - Using it all over the place instead of the hasFrontend (the latter is now only used once to guard hot path)
1376         - Introduced explicit "enabled" state of the console and runtime agents
1377
1378         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1379         (WebCore::JSHTMLCanvasElement::getContext):
1380         * bindings/js/JSMainThreadExecState.h:
1381         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
1382         * bindings/js/ScheduledAction.cpp:
1383         (WebCore::ScheduledAction::create):
1384         * bindings/js/ScriptCallStackFactory.cpp:
1385         (WebCore::createScriptCallStackForConsole):
1386         * bindings/js/ScriptCallStackFactory.h:
1387         (WebCore):
1388         * bindings/scripts/CodeGeneratorJS.pm:
1389         (GenerateCallWith):
1390         * bindings/scripts/CodeGeneratorV8.pm:
1391         (GenerateCallWith):
1392         * bindings/scripts/test/JS/JSTestObj.cpp:
1393         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
1394         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
1395         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
1396         * bindings/scripts/test/V8/V8TestObj.cpp:
1397         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
1398         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
1399         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackCallback):
1400         * bindings/v8/ScriptCallStackFactory.cpp:
1401         (WebCore::createScriptCallStackForConsole):
1402         * bindings/v8/ScriptCallStackFactory.h:
1403         (WebCore):
1404         * bindings/v8/ScriptController.cpp:
1405         (WebCore::ScriptController::callFunctionWithInstrumentation):
1406         * bindings/v8/V8DOMWindowShell.cpp:
1407         (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
1408         * bindings/v8/V8WorkerContextEventListener.cpp:
1409         (WebCore::V8WorkerContextEventListener::callListenerFunction):
1410         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1411         (WebCore::WindowSetTimeoutImpl):
1412         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1413         (WebCore::V8HTMLCanvasElement::getContextCallback):
1414         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1415         (WebCore::SetTimeoutOrInterval):
1416         * inspector/Inspector.json:
1417         * inspector/InspectorConsoleAgent.cpp:
1418         (WebCore):
1419         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
1420         (WebCore::InspectorConsoleAgent::enable):
1421         (WebCore::InspectorConsoleAgent::disable):
1422         (WebCore::InspectorConsoleAgent::clearMessages):
1423         (WebCore::InspectorConsoleAgent::clearFrontend):
1424         (WebCore::InspectorConsoleAgent::addConsoleMessage):
1425         * inspector/InspectorConsoleAgent.h:
1426         (WebCore::InspectorConsoleAgent::enabled):
1427         (InspectorConsoleAgent):
1428         * inspector/InspectorController.cpp:
1429         (WebCore::InspectorController::connectFrontend):
1430         (WebCore::InspectorController::disconnectFrontend):
1431         * inspector/InspectorInstrumentation.cpp:
1432         (WebCore):
1433         (WebCore::InspectorInstrumentation::canvasAgentEnabled):
1434         (WebCore::InspectorInstrumentation::consoleAgentEnabled):
1435         (WebCore::InspectorInstrumentation::runtimeAgentEnabled):
1436         (WebCore::InspectorInstrumentation::timelineAgentEnabled):
1437         * inspector/InspectorInstrumentation.h:
1438         (InspectorInstrumentation):
1439         (WebCore::InspectorInstrumentation::canvasAgentEnabled):
1440         (WebCore::InspectorInstrumentation::consoleAgentEnabled):
1441         (WebCore::InspectorInstrumentation::runtimeAgentEnabled):
1442         (WebCore::InspectorInstrumentation::timelineAgentEnabled):
1443         * inspector/InspectorRuntimeAgent.cpp:
1444         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
1445         * inspector/InspectorRuntimeAgent.h:
1446         (WebCore::InspectorRuntimeAgent::enabled):
1447         (WebCore::InspectorRuntimeAgent::enable):
1448         (WebCore::InspectorRuntimeAgent::disable):
1449         (InspectorRuntimeAgent):
1450         * inspector/PageRuntimeAgent.cpp:
1451         (PageRuntimeAgentState):
1452         (WebCore::PageRuntimeAgent::clearFrontend):
1453         (WebCore::PageRuntimeAgent::restore):
1454         (WebCore):
1455         (WebCore::PageRuntimeAgent::enable):
1456         (WebCore::PageRuntimeAgent::disable):
1457         (WebCore::PageRuntimeAgent::didClearWindowObject):
1458         (WebCore::PageRuntimeAgent::didCreateIsolatedContext):
1459         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
1460         * inspector/PageRuntimeAgent.h:
1461         (PageRuntimeAgent):
1462         * inspector/WorkerRuntimeAgent.cpp:
1463         * inspector/WorkerRuntimeAgent.h:
1464         * inspector/front-end/RuntimeModel.js:
1465         (WebInspector.RuntimeModel.prototype._didLoadCachedResources):
1466         * page/DOMWindow.cpp:
1467         (WebCore::DOMWindow::postMessage):
1468
1469 2012-10-01  Kenichi Ishibashi  <bashi@chromium.org>
1470
1471         [WebSocket] Setting wrong value to binaryType should not raise exception
1472         https://bugs.webkit.org/show_bug.cgi?id=97999
1473
1474         Reviewed by Yuta Kitamura.
1475
1476         Don't raise exception when binaryType is the wrong value.
1477         Instead, show an error message to console.
1478
1479         No new tests. Updated existing test.
1480
1481         * Modules/websockets/WebSocket.cpp:
1482         (WebCore::WebSocket::setBinaryType): See the description.
1483         * Modules/websockets/WebSocket.h:
1484         (WebSocket): Removed ExceptionCode argument of setBinaryType().
1485         * Modules/websockets/WebSocket.idl:
1486         Removed "setter raises(DOMException)" and "[TreatReturnedNullStringAs=Undefined]".
1487         They are no longer needed.
1488
1489 2012-10-01  Yoshifumi Inoue  <yosin@chromium.org>
1490
1491         [Forms] Adding DateTimeWeekFieldElement for multiple fields "week" input UI
1492         https://bugs.webkit.org/show_bug.cgi?id=97992
1493
1494         Reviewed by Kent Tamura.
1495
1496         This patch introduces DateTimeWeekFieldElement class for implementing
1497         multiple fields "week" input UI.
1498
1499         No new tests. This patch doesn't change behavior.
1500
1501         * html/shadow/DateTimeFieldElements.cpp:
1502         (WebCore::DateTimeWeekFieldElement::DateTimeWeekFieldElement): Added.
1503         (WebCore::DateTimeWeekFieldElement::create): Added.
1504         (WebCore::DateTimeWeekFieldElement::populateDateTimeFieldsState): Added.
1505         (WebCore::DateTimeWeekFieldElement::setValueAsDate): Added.
1506         (WebCore::DateTimeWeekFieldElement::setValueAsDateTimeFieldsState): Added.
1507         * html/shadow/DateTimeFieldElements.h:
1508         (DateTimeWeekFieldElement): Added.
1509         * platform/DateComponents.h:
1510         (WebCore::DateComponents): Added declarations of static const member variables, DateComponents::maximumWeekNumber and minimumWeekNumber.
1511         * platform/DateComponents.cpp: Added definitions of DateComponents::maximumWeekNumber and minimumWeekNumber.
1512         (WebCore::DateComponents::maxWeekNumberInYear): Changed to use maximumWeekNumber.
1513         (WebCore::DateComponents::parseWeek): Changed to use minimumWeekNumber.
1514
1515 2012-09-30  Vsevolod Vlasov  <vsevik@chromium.org>
1516
1517         Web Inspector: Separate CSSStyleModelResourceBinding into resource and content binding.
1518         https://bugs.webkit.org/show_bug.cgi?id=97994
1519
1520         Reviewed by Pavel Feldman.
1521
1522         Extracted StyleContentBinding from CSSStyleModelResourceBinding.
1523         Now CSSStyleModelResourceBinding is responsible for mapping between stylesheets and resources.
1524         StyleContentBinding is now responsible for synchronization between stylesheet content and uiSourceCode content.
1525
1526         * inspector/front-end/CSSStyleModel.js:
1527         (WebInspector.CSSStyleModelResourceBinding):
1528         (WebInspector.CSSStyleModelResourceBinding.prototype.requestStyleSheetIdForResource):
1529         (WebInspector.CSSStyleModelResourceBinding.prototype.requestResourceURLForStyleSheetId):
1530         * inspector/front-end/StyleSource.js:
1531         (WebInspector.StyleSource.prototype._commitIncrementalEdit):
1532         * inspector/front-end/StylesSourceMapping.js:
1533         (WebInspector.StyleContentBinding):
1534         (WebInspector.StyleContentBinding.prototype.setStyleContent.callback):
1535         (WebInspector.StyleContentBinding.prototype.setStyleContent):
1536         (WebInspector.StyleContentBinding.prototype._innerSetContent.callback):
1537         (WebInspector.StyleContentBinding.prototype._innerSetContent):
1538         (WebInspector.StyleContentBinding.prototype._styleSheetChanged.callback):
1539         (WebInspector.StyleContentBinding.prototype._styleSheetChanged):
1540         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
1541         * inspector/front-end/inspector.js:
1542
1543 2012-10-01  Alexander Pavlov  <apavlov@chromium.org>
1544
1545         Web Inspector: [Device Metrics] Remove the gutter overlay moving its functionality into the InspectorOverlay
1546         https://bugs.webkit.org/show_bug.cgi?id=97799
1547
1548         Reviewed by Pavel Feldman.
1549
1550         Re-applying r129746 with test flakiness fixed.
1551
1552         In order to reduce the amount of port-specific code, the gutter overlay painted in the device metrics emulation mode
1553         has been replaced by the respective functionality in the HTML-based InspectorOverlay in WebCore. The InspectorOverlay
1554         now covers the entire WebView rather than the FrameView only.
1555
1556         * inspector/InspectorController.cpp:
1557         (WebCore::InspectorController::webViewResized):
1558         (WebCore):
1559         * inspector/InspectorController.h:
1560         (WebCore):
1561         (InspectorController):
1562         * inspector/InspectorOverlay.cpp:
1563         (WebCore::InspectorOverlay::InspectorOverlay):
1564         (WebCore::InspectorOverlay::paint):
1565         (WebCore::InspectorOverlay::resize):
1566         (WebCore):
1567         (WebCore::InspectorOverlay::update):
1568         (WebCore::InspectorOverlay::drawGutter):
1569         (WebCore::InspectorOverlay::reset):
1570         * inspector/InspectorOverlay.h:
1571         (InspectorOverlay):
1572         * inspector/InspectorOverlayPage.html: Introduce the gutter painting functionality previously found in the Chromium's
1573         DeviceMetricsSupport class, which used to implement WebPageOverlay.
1574
1575 2012-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
1576
1577         Unreviewed. Fix GTK+ build after r129908.
1578
1579         * GNUmakefile.list.am: Add new files to compilation.
1580
1581 2012-10-01  Philip Rogers  <pdr@google.com>
1582
1583         Remove overzealous assert in SVGElement::localAttributeToPropertyMap
1584         https://bugs.webkit.org/show_bug.cgi?id=97291
1585
1586         Reviewed by Nikolas Zimmermann.
1587
1588         This patch removes an assert where we did not expect
1589         SVGElement::localAttributeToPropertyMap where we did not to be called. This
1590         function turns out to be useful and this patch removes that assert.
1591
1592         If we encounter a non-SVG tag during SVG parsing (e.g. <svg><price></svg>) we return a
1593         vanilla SVGElement instance from SVGElementFactory::createSVGElement. Previously,
1594         trying to animate this would ASSERT because it was not possible to determine the
1595         animated type. After this patch, an empty localAttributeToPropertyMap is used so
1596         that the animated type returned from SVGAnimateElement::determineAnimatedPropertyType
1597         is AnimatedUnknown.
1598
1599         This patch simply removes an ASSERT so no test is provided.
1600
1601         * svg/SVGElement.cpp:
1602         (WebCore::SVGElement::localAttributeToPropertyMap):
1603
1604 2012-10-01  Sheriff Bot  <webkit.review.bot@gmail.com>
1605
1606         Unreviewed, rolling out r130004.
1607         http://trac.webkit.org/changeset/130004
1608         https://bugs.webkit.org/show_bug.cgi?id=97996
1609
1610         Test shadow-dom-modify-chardata.html is failing (Requested by
1611         keishi on #webkit).
1612
1613         * dom/CharacterData.cpp:
1614         (WebCore::CharacterData::dispatchModifiedEvent):
1615
1616 2012-10-01  Keishi Hattori  <keishi@webkit.org>
1617
1618         REGRESSION(r127727): Calendar picker is ignoring step
1619         https://bugs.webkit.org/show_bug.cgi?id=97893
1620
1621         Reviewed by Kent Tamura.
1622
1623         There were two mistakes:
1624         - An if-statement to check step attribute validity was wrong, and
1625         - DateTiemChooserParameters.step was milleseconds when it should be number of days.
1626         This will be changing the DateTimeChooserParameters.step to milliseconds so we can handle steps for other input types in the future.
1627
1628         Test: fast/forms/date/calendar-picker-appearance-with-step.html
1629
1630         * Resources/pagepopups/calendarPicker.js:
1631         (CalendarPicker):
1632         * html/shadow/CalendarPickerElement.cpp:
1633         (WebCore::CalendarPickerElement::openPopup): If statement was wrong.
1634
1635 2012-09-30  Glenn Adams  <glenn@skynav.com>
1636
1637         Sign in front of keyframe selector causes stylesheet parsing to abort
1638         https://bugs.webkit.org/show_bug.cgi?id=96844
1639
1640         Reviewed by Simon Fraser.
1641
1642         Allow optional unary operator (+|-) on PERCENTAGE in keyframe selector.
1643
1644         Test: animations/keyframe-selector-negative-percentage.html
1645
1646         * css/CSSGrammar.y:
1647         Add maybe_unary_operator to PERCENTAGE on keyframe selector. Negative keyframe
1648         selector value is already ignored in StyleKeyframe::parseKeyString.
1649
1650 2012-09-30  MORITA Hajime  <morrita@google.com>
1651
1652         https://bugs.webkit.org/show_bug.cgi?id=97988
1653         Crash on FrameTree::scopedChildCount()
1654
1655         Reviewed by Kent Tamura.
1656
1657         The series of crash reports says that there are some null pointer
1658         access in scopedChildCount(). This change added a null guard
1659         against Frame::document(), that can return null.
1660
1661         No new tests. This is tied to some specific timing and is hard to reproduce.
1662
1663         * page/FrameTree.cpp:
1664         (WebCore::FrameTree::scopedChildCount):
1665         (WebCore::FrameTree::scopedChild):
1666         (WebCore):
1667
1668 2012-09-30  Yoshifumi Inoue  <yosin@chromium.org>
1669
1670         Make multiple fields date/time input UI related files to available all ports
1671         https://bugs.webkit.org/show_bug.cgi?id=97989
1672
1673         Reviewed by Kent Tamura.
1674
1675         This patch adds multiple fields date/time input UI related files for
1676         ports not using WebCore.gyp and simplifies include directive in
1677         MonthInputType.h and TimeInputType.h.
1678
1679         Added files are:
1680           - html/BaseMultipleFieldsDateAndTimeInputType.{cpp,h}
1681           - html/shadow/DateTimeEditElement.{cpp,h}
1682           - html/shadow/DateTimeFieldElement.{cpp,h}
1683           - html/shadow/DateTimeFieldElements.{cpp,h}
1684           - html/shadow/DateTimeNumericFieldElement.{cpp,h}
1685           - html/shadow/DateTimeSymbolicFieldElement.{cpp,h}
1686
1687         No new tests. This patch doesn't change behavior.
1688
1689         * CMakeLists.txt: Changed to add multiple fields date/time input UI related files.
1690         * GNUmakefile.list.am: ditto
1691         * Target.pri: ditto
1692         * WebCore.vcproj/WebCore.vcproj: ditto
1693         * WebCore.xcodeproj/project.pbxproj: ditto
1694         * html/MonthInputType.h: Changed to simplify include directive for base class.
1695         * html/TimeInputType.h: ditto
1696
1697 2012-09-30  Keishi Hattori  <keishi@webkit.org>
1698
1699         Web Inspector: Modifications in a shadow tree don't update the Elements panel.
1700         https://bugs.webkit.org/show_bug.cgi?id=97056
1701
1702         Reviewed by Pavel Feldman.
1703
1704         Send characterDataModified event for shadow dom nodes too so they update the elements panel.
1705
1706         Test: inspector/elements/shadow-dom-modify-chardata.html
1707
1708         * dom/CharacterData.cpp:
1709         (WebCore::CharacterData::dispatchModifiedEvent):
1710
1711 2012-09-30  Andreas Kling  <kling@webkit.org>
1712
1713         Split EventTargetData out of NodeRareData to reduce memory use.
1714         <http://webkit.org/b/97987>
1715         <rdar://problem/12403258>
1716
1717         Reviewed by Anders Carlsson.
1718
1719         Move EventTargetData to its own Node-flag/hashmap instead of piggybacking on NodeRareData.
1720         This reduces memory consumption by 1.06MB on Membuster3. Note that NodeRareData shrinks by
1721         one pointer as well.
1722
1723         * dom/Node.cpp:
1724         (WebCore::Node::~Node):
1725         (WebCore::eventTargetDataMap):
1726         (WebCore::Node::eventTargetData):
1727         (WebCore::Node::ensureEventTargetData):
1728         (WebCore::Node::clearEventTargetData):
1729         (WebCore::Node::handleLocalEvents):
1730         * dom/Node.h:
1731         (WebCore::Node::hasEventTargetData):
1732         (WebCore::Node::setHasEventTargetData):
1733         * dom/NodeRareData.h:
1734         (NodeRareData):
1735
1736 2012-09-30  Andreas Kling  <kling@webkit.org>
1737
1738         444kB below CSSParser::parseDeprecatedGradient() on Membuster3.
1739         <http://webkit.org/b/97981>
1740         <rdar://problem/12403058>
1741
1742         Reviewed by Anders Carlsson.
1743
1744         Slap an inline capacity of 2 on the Vector<CSSGradientColorStop> in CSSGradientValue.
1745         This covers the majority of gradient values, and reduces memory consumption by ~250kB on Membuster3.
1746
1747         * css/CSSGradientValue.h:
1748         (WebCore::CSSGradientValue::stopCount):
1749         * css/CSSParser.cpp:
1750         (WebCore::CSSParser::parseLinearGradient):
1751         (WebCore::CSSParser::parseGradientColorStops):
1752
1753 2012-09-30  Mike West  <mkwst@chromium.org>
1754
1755         Remove FIXME comments refering to non-existent code in JSDOMBinding.cpp
1756         https://bugs.webkit.org/show_bug.cgi?id=97977
1757
1758         Reviewed by Adam Barth.
1759
1760         I did a quick grep through the code to determine where these FIXME
1761         comments were suggesting that code should be merged. So far as I can
1762         tell, 'immediatelyReportUnsafeAccessTo' only exists in these comments.
1763
1764         Just cleanup, no functional change.
1765
1766         * bindings/js/JSDOMBinding.cpp:
1767         (WebCore::shouldAllowAccessToFrame):
1768         (WebCore::shouldAllowAccessToDOMWindow):
1769
1770 2012-09-30  Martin Robinson  <mrobinson@igalia.com>
1771
1772         [TextureMapper] [WebKit2] Crash in WebCore::BitmapTextureGL::updateContents
1773         https://bugs.webkit.org/show_bug.cgi?id=97394
1774
1775         Reviewed by Noam Rosenthal.
1776
1777         When a TextureMapper is destroyed, layers can still contain references
1778         to textures obtained from that TextureMapper's texture pool. Trying to
1779         access an unreffed TextureMapper in the BitmapTexture's destructor
1780         causes a crash.
1781
1782         Instead of storing a raw pointer to a TextureMapper, we can simply store
1783         a reference to the underlying GraphicsContext3D. All TextureMapper
1784         implementations use the current GL context at this moment, so one GC3D
1785         referencing the current context is the same as any other.
1786
1787         * platform/graphics/texmap/TextureMapper.h: Remove the clearTexturePool
1788         method. It's no longer used.
1789         (WebCore::BitmapTexture::applyFilters): Add a TextureMapper* argument.
1790         * platform/graphics/texmap/TextureMapperGL.cpp:
1791         (WebCore::BitmapTextureGL::BitmapTextureGL): Keep a reference to the
1792         GraphicsContext3D instead of the TextureMapper.
1793         (WebCore::BitmapTextureGL::didReset): Use the GC3D reference.
1794         (WebCore::BitmapTextureGL::updateContents): Ditto.
1795         (WebCore::BitmapTextureGL::applyFilters): Accept the TextureMapper as an argument.
1796         (WebCore::BitmapTextureGL::initializeStencil): Use the GC3D reference.
1797         (WebCore::BitmapTextureGL::clearIfNeeded): Ditto.
1798         (WebCore::BitmapTextureGL::createFboIfNeeded): Ditto.
1799         (WebCore::BitmapTextureGL::bind): Accept the TextureMapper as an argument.
1800         (WebCore::BitmapTextureGL::~BitmapTextureGL): Use the GC3D reference.
1801         (WebCore::TextureMapperGL::~TextureMapperGL): Remove the call to clearTexturePool
1802         as it's no longer necessary.
1803         (WebCore::TextureMapperGL::bindSurface): Ditto.
1804         * platform/graphics/texmap/TextureMapperGL.h:
1805         (BitmapTextureGL): Keep a GC3D reference instead of a TextureMapper pointer.
1806         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1807         (WebCore::BitmapTextureImageBuffer::applyFilters): Add a TextureMapper argument.
1808         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1809         (BitmapTextureImageBuffer):
1810         * platform/graphics/texmap/TextureMapperLayer.cpp:
1811         (WebCore::applyFilters): Ditto.
1812
1813 2012-09-29  Dongwoo Joshua Im  <dw.im@samsung.com>
1814
1815         AsyncFileSystem::openFileSystem should have FileSystemType as a parameter.
1816         https://bugs.webkit.org/show_bug.cgi?id=97963
1817
1818         Reviewed by Gyuyoung Kim.
1819
1820         FileSystemType is an important information to maintain the file system,
1821         and AsyncFileSystem::openFileSystem need to get the type as a parameter.
1822         And, there are "FIXME" comments about that in WebCore source codes.
1823
1824         No new functionality, no new tests.
1825
1826         * Modules/filesystem/LocalFileSystem.cpp: Add FileSystemType as a parameter of AsyncFileSystem::openFileSystem.
1827         (WebCore::openFileSystem):
1828         (WebCore::LocalFileSystem::readFileSystem):
1829         (WebCore::LocalFileSystem::requestFileSystem):
1830         * platform/AsyncFileSystem.cpp: ditto.
1831         (WebCore::AsyncFileSystem::openFileSystem):
1832         * platform/AsyncFileSystem.h: ditto.
1833         (AsyncFileSystem):
1834         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: ditto.
1835         (WebCore::AsyncFileSystem::openFileSystem):
1836         * platform/gtk/AsyncFileSystemGtk.cpp: ditto.
1837         (WebCore::AsyncFileSystem::openFileSystem):
1838
1839 2012-09-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1840
1841         Unreviewed, rolling out r129965.
1842         http://trac.webkit.org/changeset/129965
1843         https://bugs.webkit.org/show_bug.cgi?id=97970
1844
1845         Causes ASSERTs in workers (Requested by abarth on #webkit).
1846
1847         * bindings/v8/DOMData.cpp:
1848         (WebCore::DOMData::getCurrentStore):
1849         * bindings/v8/ScopedPersistent.h:
1850         * bindings/v8/ScriptController.cpp:
1851         (WebCore::ScriptController::resetIsolatedWorlds):
1852         (WebCore::ScriptController::evaluateInIsolatedWorld):
1853         (WebCore::ScriptController::currentWorldContext):
1854         * bindings/v8/V8Binding.cpp:
1855         (WebCore::perContextDataForCurrentWorld):
1856         * bindings/v8/V8DOMWindowShell.cpp:
1857         (WebCore::setIsolatedWorldField):
1858         (WebCore::V8DOMWindowShell::enteredIsolatedWorldContext):
1859         (WebCore::V8DOMWindowShell::destroyIsolatedShell):
1860         (WebCore):
1861         (WebCore::isolatedContextWeakCallback):
1862         (WebCore::V8DOMWindowShell::disposeContext):
1863         (WebCore::V8DOMWindowShell::initializeIfNeeded):
1864         (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
1865         * bindings/v8/V8DOMWindowShell.h:
1866         (V8DOMWindowShell):
1867         (WebCore::V8DOMWindowShell::getEntered):
1868         * bindings/v8/V8DOMWrapper.h:
1869         (WebCore::V8DOMWrapper::getCachedWrapper):
1870         * bindings/v8/WorldContextHandle.cpp:
1871         (WebCore::WorldContextHandle::WorldContextHandle):
1872         * bindings/v8/custom/V8DocumentCustom.cpp:
1873         (WebCore::toV8):
1874         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1875         (WebCore::toV8):
1876         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
1877         (WebCore::toV8):
1878         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
1879         (WebCore::V8XMLHttpRequest::constructorCallback):
1880
1881 2012-09-29  Emil A Eklund  <eae@chromium.org>
1882
1883         Unreviewed build fix for chromium/clank.
1884
1885         * platform/FractionalLayoutUnit.h:
1886         (WebCore::FractionalLayoutUnit::FractionalLayoutUnit):
1887
1888 2012-09-29  Byungwoo Lee  <bw80.lee@samsung.com>
1889
1890         Fix build warning : -Wparentheses.
1891         https://bugs.webkit.org/show_bug.cgi?id=97961
1892
1893         Reviewed by Kentaro Hara.
1894
1895         Explicit braces are added around the && statement to fix -Wparentheses warning.
1896
1897         * mathml/MathMLElement.h:
1898         (WebCore::toMathMLElement):
1899
1900 2012-09-29  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1901
1902         Scroll offset of flex items lost during relayout
1903         https://bugs.webkit.org/show_bug.cgi?id=97706
1904
1905         Reviewed by Tony Chang.
1906
1907         Test: fast/flexbox/overflow-keep-scrollpos.html
1908
1909         Flex box does a second pass layout of the flex children.
1910
1911         We layout the child without scrollbars (to get the size
1912         used for flexing), then we relayout the child at its final size.
1913
1914         We must not apply the scroll position during the first pass,
1915         as it will be clamped to 0 (no scrolling possible).
1916
1917         * rendering/RenderBlock.h:
1918         (RenderBlock):
1919
1920         Make updateScrollInfoAfterLayout public
1921
1922         * rendering/RenderFlexibleBox.cpp:
1923         (WebCore::RenderFlexibleBox::layoutBlock):
1924
1925         Delay applying scroll info until we clamp the size of the child
1926         and get scrollbars back again. For this to work we use
1927         RenderBlock::updateScrollInfoAfterLayout instead of the non-guarded
1928         RenderLayer::updateScrollInfoAfterLayout.
1929
1930         * rendering/RenderBlock.cpp:
1931         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
1932
1933         Add workaround for now to keep passing css3/flexbox/child-overflow.html
1934
1935         Basically do not postpone applying scroll changes for RenderBlocks
1936         with opposite writing mode, as they need to have their content
1937         overflow in the right direction.
1938
1939 2012-09-29  Dimitri Glazkov  <dglazkov@chromium.org>
1940
1941         Slightly improve clarity of the patch in bug 78595.
1942         https://bugs.webkit.org/show_bug.cgi?id=97944
1943
1944         Reviewed by Andreas Kling.
1945
1946         Since all types of relations, except SubSelector are effectively ignoring the calculated value of pseudoId, make the code reflect that a bit more clearly. 
1947
1948         No change in behavior, covered by test in bug 78595.
1949
1950         * css/SelectorChecker.cpp:
1951         (WebCore::SelectorChecker::checkSelector): Added ignoreDynamicPseudo value that's given to all callsites that should ignore the result.
1952
1953 2012-09-29  Kent Tamura  <tkent@chromium.org>
1954
1955         Remove LocalizedDate*.*
1956         https://bugs.webkit.org/show_bug.cgi?id=97957
1957
1958         Reviewed by Kentaro Hara.
1959
1960         The functions declared in LocalizedDate.h are replaced with member
1961         functions of Localizer. LocalizedDate.h and its implementations
1962         are not needed any more.
1963
1964         No new tests. This should not change any behavior.
1965
1966         * GNUmakefile.list.am: Remove LocalizedDate.h and LocalizedDateNode.cpp
1967         * WebCore.vcproj/WebCore.vcproj: ditto.
1968         * WebCore.xcodeproj/project.pbxproj: ditto.
1969         * CMakeLists.txt: Remove LocalizedDateNone.cpp
1970         * Target.pri: ditto.
1971         * WebCore.gyp/WebCore.gyp: Remove LocalizedDate*.*. Update a comment.
1972         * WebCore.gypi: Remove LocalizedDate*.*.
1973
1974         * html/BaseDateAndTimeInputType.cpp: Use Localizer functions.
1975         (WebCore::BaseDateAndTimeInputType::localizeValue):
1976         (WebCore::BaseDateAndTimeInputType::convertFromVisibleValue):
1977         * html/DateInputType.cpp: ditto.
1978         (WebCore::DateInputType::fixedPlaceholder):
1979
1980         * platform/text/Localizer.h:
1981         (Localizer): Move comments from LocalziedDate.h.
1982         * platform/text/mac/LocaleMac.mm:
1983         Remove unnecessary include of LocalizedDate.h.
1984
1985         * platform/text/LocalizedDate.h: Removed.
1986         * platform/text/LocalizedDateICU.cpp: Removed.
1987         * platform/text/LocalizedDateNone.cpp: Removed.
1988         * platform/text/LocalizedDateWin.cpp: Removed.
1989         * platform/text/mac/LocalizedDateMac.cpp: Removed.
1990
1991 2012-09-28  Adam Barth  <abarth@webkit.org>
1992
1993         [V8] The concept of forceNewObject is unneeded (dom-traverse gets 3% faster)
1994         https://bugs.webkit.org/show_bug.cgi?id=97943
1995
1996         Reviewed by Kentaro Hara.
1997
1998         We don't need the concept of forceNewObject. It doesn't do anything
1999         useful and it makes the bindings slower.
2000
2001         * bindings/scripts/CodeGeneratorV8.pm:
2002         (GenerateHeader):
2003         (GenerateToV8Converters):
2004         (NativeToJSValue):
2005         * bindings/v8/custom/V8DocumentCustom.cpp:
2006         (WebCore::toV8):
2007         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2008         (WebCore::toV8):
2009         * bindings/v8/custom/V8HTMLElementCustom.cpp:
2010         (WebCore::toV8):
2011         * bindings/v8/custom/V8NodeCustom.cpp:
2012         (WebCore::toV8Slow):
2013         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
2014         (WebCore::toV8):
2015         * bindings/v8/custom/V8SVGElementCustom.cpp:
2016         (WebCore::toV8):
2017         * dom/make_names.pl:
2018         (printWrapperFactoryCppFile):
2019         (printWrapperFactoryHeaderFile):
2020
2021 2012-09-28  Elliott Sprehn  <esprehn@chromium.org>
2022
2023         Allow any kind of v8::Handle in invokeCallback instead of requiring a v8::Persistent.
2024         https://bugs.webkit.org/show_bug.cgi?id=97956
2025
2026         Reviewed by Adam Barth.
2027
2028         Use v8::Handle instead of v8::Persistent for the callback argument on invokeCallback.
2029         There doesn't seem to be any reason for requiring a Persistent, and it makes it harder
2030         to use this API.
2031
2032         This is factored out of http://wkbug.com/93661
2033
2034         No new tests, this is functionally equivalent.
2035
2036         * bindings/v8/V8Callback.cpp:
2037         (WebCore::invokeCallback):
2038         * bindings/v8/V8Callback.h:
2039         (WebCore):
2040
2041 2012-09-28  Anders Carlsson  <andersca@apple.com>
2042
2043         Remove support for method overloading from bridge code
2044         https://bugs.webkit.org/show_bug.cgi?id=97959
2045
2046         Reviewed by Dan Bernstein.
2047
2048         The method overloading handling was only in place for the (now removed) Java bridge. 
2049         Replace MethodList everywhere with a single Method pointer.
2050
2051         * GNUmakefile.am:
2052         * GNUmakefile.list.am:
2053         * WebCore.exp.in:
2054         * bridge/c/c_class.cpp:
2055         (JSC::Bindings::CClass::methodNamed):
2056         * bridge/c/c_class.h:
2057         (CClass):
2058         * bridge/c/c_instance.cpp:
2059         (JSC::Bindings::CRuntimeMethod::create):
2060         (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
2061         (JSC::Bindings::CInstance::getMethod):
2062         (JSC::Bindings::CInstance::invokeMethod):
2063         * bridge/jsc/BridgeJSC.h:
2064         (Bindings):
2065         (Class):
2066         * bridge/objc/objc_class.h:
2067         (ObjcClass):
2068         * bridge/objc/objc_class.mm:
2069         (JSC::Bindings::ObjcClass::methodNamed):
2070         * bridge/objc/objc_instance.mm:
2071         (ObjCRuntimeMethod::create):
2072         (ObjCRuntimeMethod::ObjCRuntimeMethod):
2073         (ObjcInstance::invokeMethod):
2074         * bridge/qt/qt_class.cpp:
2075         (JSC::Bindings::QtClass::methodNamed):
2076         * bridge/qt/qt_class.h:
2077         (QtClass):
2078         * bridge/qt/qt_instance.cpp:
2079         (JSC::Bindings::QtInstance::getMethod):
2080         * bridge/runtime_method.cpp:
2081         (JSC::RuntimeMethod::RuntimeMethod):
2082         (JSC::RuntimeMethod::lengthGetter):
2083         (JSC::callRuntimeMethod):
2084         * bridge/runtime_method.h:
2085         (JSC::RuntimeMethod::create):
2086         (JSC::RuntimeMethod::method):
2087         (RuntimeMethod):
2088         * bridge/runtime_object.cpp:
2089         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
2090         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
2091
2092 2012-09-28  Elliott Sprehn  <esprehn@chromium.org>
2093
2094         Fix compilation of V8DependentRetained and JSDependentRetained.
2095         https://bugs.webkit.org/show_bug.cgi?id=97955
2096
2097         Reviewed by Kentaro Hara.
2098
2099         Fix bad usage of putDirect and removeDirect from JSDependentRetained and fix
2100         incorrect assumptions about how weak handles work in V8. This is refactored
2101         out of the patch on http://wkbug.com/93661
2102
2103         No tests needed, this just fixes the compile and wrong usage of ScopedPersistent.
2104
2105         * bindings/js/JSDependentRetained.h:
2106         (WebCore::JSDependentRetained::JSDependentRetained):
2107         (WebCore::JSDependentRetained::retain):
2108         (WebCore::JSDependentRetained::release):
2109         (JSDependentRetained):
2110         * bindings/v8/V8DependentRetained.h:
2111         (WebCore::V8DependentRetained::V8DependentRetained):
2112         (WebCore::V8DependentRetained::retain):
2113         (WebCore::V8DependentRetained::weakCallback):
2114
2115 2012-09-28  Ojan Vafai  <ojan@chromium.org>
2116
2117         Fix chromium build after http://trac.webkit.org/changeset/129964.
2118         * WebCore.gypi:
2119
2120 2012-09-28  Simon Fraser  <simon.fraser@apple.com>
2121
2122         Crash re-entering Document layout with frame flattening enabled
2123         https://bugs.webkit.org/show_bug.cgi?id=97841
2124
2125         Reviewed by Brady Eidson.
2126
2127         When creating a CachedFrame, clearTimers on the Frame later; it has to
2128         be done after documentWillSuspendForPageCache(), because the style
2129         changes that HTMLPlugInImageElement::documentWillSuspendForPageCache()
2130         do can schedule a layout on the FrameView, and we don't want this layout
2131         timer to fire while the page is in the page cache.
2132
2133         Add an assertion in FrameView::layout() that the document is not in
2134         the page cache. Without the above change, this would assert in
2135         the plugins/frameset-with-plugin-frame.html test.
2136
2137         * history/CachedFrame.cpp:
2138         (WebCore::CachedFrame::CachedFrame):
2139         * page/FrameView.cpp:
2140         (WebCore::FrameView::layout):
2141
2142 2012-09-28  Dan Carney  <dcarney@google.com>
2143
2144         Remove V8DOMWindowShell::getEntered
2145         https://bugs.webkit.org/show_bug.cgi?id=96637
2146
2147         Reviewed by Adam Barth.
2148
2149         V8DOMWindowShell::getEntered was refactored so that the window shell
2150         no longer has to be kept alive by a v8 context but rather a smaller
2151         object.
2152
2153         No new tests. No change in functionality.
2154
2155         * bindings/v8/DOMData.cpp:
2156         (WebCore::DOMData::getCurrentStore):
2157         * bindings/v8/ScopedPersistent.h:
2158         (WebCore::ScopedPersistent::leakHandle):
2159         (ScopedPersistent):
2160         * bindings/v8/ScriptController.cpp:
2161         (WebCore::ScriptController::resetIsolatedWorlds):
2162         (WebCore::ScriptController::evaluateInIsolatedWorld):
2163         (WebCore::ScriptController::currentWorldContext):
2164         * bindings/v8/V8Binding.cpp:
2165         (WebCore::perContextDataForCurrentWorld):
2166         * bindings/v8/V8DOMWindowShell.cpp:
2167         (WebCore::setIsolatedWorldField):
2168         (WebCore::V8DOMWindowShell::toIsolatedContextData):
2169         (WebCore::isolatedContextWeakCallback):
2170         (WebCore::V8DOMWindowShell::disposeContext):
2171         (WebCore::V8DOMWindowShell::clearIsolatedShell):
2172         (WebCore):
2173         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2174         (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
2175         * bindings/v8/V8DOMWindowShell.h:
2176         (V8DOMWindowShell):
2177         (IsolatedContextData):
2178         (WebCore::V8DOMWindowShell::IsolatedContextData::create):
2179         (WebCore::V8DOMWindowShell::IsolatedContextData::world):
2180         (WebCore::V8DOMWindowShell::IsolatedContextData::perContextData):
2181         (WebCore::V8DOMWindowShell::IsolatedContextData::setSecurityOrigin):
2182         (WebCore::V8DOMWindowShell::IsolatedContextData::securityOrigin):
2183         (WebCore::V8DOMWindowShell::IsolatedContextData::IsolatedContextData):
2184         (WebCore::V8DOMWindowShell::enteredIsolatedContext):
2185         (WebCore::V8DOMWindowShell::enteredIsolatedContextData):
2186         * bindings/v8/V8DOMWrapper.h:
2187         (WebCore::V8DOMWrapper::getCachedWrapper):
2188         * bindings/v8/WorldContextHandle.cpp:
2189         (WebCore::WorldContextHandle::WorldContextHandle):
2190         * bindings/v8/custom/V8DocumentCustom.cpp:
2191         (WebCore::toV8):
2192         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2193         (WebCore::toV8):
2194         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
2195         (WebCore::toV8):
2196         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
2197         (WebCore::V8XMLHttpRequest::constructorCallback):
2198
2199 2012-09-28  Anders Carlsson  <andersca@apple.com>
2200
2201         Remove Java bridge
2202         https://bugs.webkit.org/show_bug.cgi?id=97954
2203
2204         Reviewed by Sam Weinig.
2205
2206         The Java bridge is not used by any port; Mac now has a NPAPI Java plug-in.
2207
2208         * WebCore.exp.in:
2209         * WebCore.xcodeproj/project.pbxproj:
2210         * bindings/js/ScriptController.cpp:
2211         (WebCore::ScriptController::ScriptController):
2212         * bindings/js/ScriptController.h:
2213         (ScriptController):
2214         * bindings/js/ScriptControllerMac.mm:
2215         (WebCore::ScriptController::createScriptInstanceForWidget):
2216         * bridge/jni/JNIUtility.cpp: Removed.
2217         * bridge/jni/JNIUtility.h: Removed.
2218         * bridge/jni/JavaType.h: Removed.
2219         * bridge/jni/JobjectWrapper.cpp: Removed.
2220         * bridge/jni/JobjectWrapper.h: Removed.
2221         * bridge/jni/jni_jsobject.h: Removed.
2222         * bridge/jni/jni_jsobject.mm: Removed.
2223         * bridge/jni/jni_objc.mm: Removed.
2224         * bridge/jni/jsc/JNIUtilityPrivate.cpp: Removed.
2225         * bridge/jni/jsc/JNIUtilityPrivate.h: Removed.
2226         * bridge/jni/jsc/JavaArrayJSC.cpp: Removed.
2227         * bridge/jni/jsc/JavaArrayJSC.h: Removed.
2228         * bridge/jni/jsc/JavaClassJSC.cpp: Removed.
2229         * bridge/jni/jsc/JavaClassJSC.h: Removed.
2230         * bridge/jni/jsc/JavaFieldJSC.cpp: Removed.
2231         * bridge/jni/jsc/JavaFieldJSC.h: Removed.
2232         * bridge/jni/jsc/JavaInstanceJSC.cpp: Removed.
2233         * bridge/jni/jsc/JavaInstanceJSC.h: Removed.
2234         * bridge/jni/jsc/JavaMethodJSC.cpp: Removed.
2235         * bridge/jni/jsc/JavaMethodJSC.h: Removed.
2236         * bridge/jni/jsc/JavaRuntimeObject.cpp: Removed.
2237         * bridge/jni/jsc/JavaRuntimeObject.h: Removed.
2238         * bridge/jni/jsc/JavaStringJSC.h: Removed.
2239         * bridge/runtime_root.h:
2240         * loader/FrameLoaderClient.h:
2241         (FrameLoaderClient):
2242
2243 2012-09-28  Dimitri Glazkov  <dglazkov@chromium.org>
2244
2245         Remove unused parameter in SelectorChecker::checkScrollbarPseudoClass.
2246         https://bugs.webkit.org/show_bug.cgi?id=97941
2247
2248         Reviewed by Kentaro Hara.
2249
2250         The last parameter in checkScrollbarPseudoClass was unused, so I removed it. 
2251
2252         No change in behavior, just refactoring.
2253
2254         * css/SelectorChecker.cpp:
2255         (WebCore::SelectorChecker::checkOneSelector): Changed the callsite to accommodate the change.
2256         (WebCore::SelectorChecker::checkScrollbarPseudoClass): Removed last param.
2257         * css/SelectorChecker.h: Ditto.
2258
2259 2012-09-27  Alpha Lam  <hclam@chromium.org>
2260
2261         REGRESSION(r122215) - CachedImage::likelyToBeUsedSoon crashes on accessing a deleted CachedImageClient
2262         https://bugs.webkit.org/show_bug.cgi?id=97749
2263
2264         Reviewed by James Robinson.
2265
2266         All implementations of Clipboard set themselves as clients to CachedImage
2267         through the JS API setDrageImage() but they do not detach during destruction.
2268         This causes memory corruption when CachedImage tries to access a deleted client
2269         when MemoryCache prunes and calls CachedImage::likelyToUsedSoon().
2270
2271         Manual test added: ManualTests/drag-image-no-crash.html
2272
2273         * platform/chromium/ClipboardChromium.cpp:
2274         (WebCore::ClipboardChromium::~ClipboardChromium):
2275         * platform/gtk/ClipboardGtk.cpp:
2276         (WebCore::ClipboardGtk::~ClipboardGtk):
2277         * platform/mac/ClipboardMac.mm:
2278         (WebCore::ClipboardMac::~ClipboardMac):
2279         * platform/win/ClipboardWin.cpp:
2280         (WebCore::ClipboardWin::~ClipboardWin):
2281
2282 2012-09-28  Anders Carlsson  <andersca@apple.com>
2283
2284         Remove Instance::setDidExecuteFunction
2285         https://bugs.webkit.org/show_bug.cgi?id=97952
2286
2287         Reviewed by Alexey Proskuryakov.
2288
2289         Instance::setDidExecuteFunction was added over 8 years ago to fix a bug where Objective-C
2290         DOM calls weren't updating the document correctly. Nowadays we correctly invalidate the DOM tree
2291         when these calls are made so we don't need an extra step to do so.
2292
2293         * bindings/js/ScriptControllerMac.mm:
2294         (WebCore):
2295         (WebCore::ScriptController::initJavaJSBindings):
2296         * bindings/objc/WebScriptObject.mm:
2297         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2298         (-[WebScriptObject evaluateWebScript:]):
2299         (-[WebScriptObject setValue:forKey:]):
2300         (-[WebScriptObject valueForKey:]):
2301         (-[WebScriptObject removeWebScriptKey:]):
2302         (-[WebScriptObject hasWebScriptKey:]):
2303         (-[WebScriptObject stringRepresentation]):
2304         (-[WebScriptObject webScriptValueAtIndex:]):
2305         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
2306         * bridge/jsc/BridgeJSC.cpp:
2307         * bridge/jsc/BridgeJSC.h:
2308         (Instance):
2309
2310 2012-09-28  Emil A Eklund  <eae@chromium.org>
2311
2312         Improve saturation arithmetic support in FractionalLayoutUnit
2313         https://bugs.webkit.org/show_bug.cgi?id=97938
2314
2315         Reviewed by Levi Weintraub.
2316
2317         Fix bug in FractionalLayoutUnit::setValue where greater than or
2318         equals is used instead of greater than to clamp the values. 
2319         Add SATURATED_LAYOUT_ARITHMETIC support to round preventing it
2320         from overflowing when adding the fraction.
2321
2322         Test: fast/sub-pixel/large-sizes.html
2323
2324         * platform/FractionalLayoutUnit.h:
2325         (WebCore::FractionalLayoutUnit::round):
2326         (WebCore::FractionalLayoutUnit::setValue):
2327
2328 2012-09-28  Luiz Agostini  <luiz.agostini@nokia.com>
2329
2330         TextureMapperGL destructor crashes
2331         https://bugs.webkit.org/show_bug.cgi?id=97942
2332
2333         Reviewed by Noam Rosenthal.
2334
2335         BitmapTextureGL destructor uses a TextureMapperGL instance. The problem is that 
2336         BitmapTextureGL objects are destroyed on TextureMapper destructor and at that 
2337         time TextureMapperGL specific methods and data are not available any more.
2338
2339         This patch creates a new protected method TextureMapper::clearTexturePool()
2340         that is called in TextureMapperGL's destructor.
2341
2342         * platform/graphics/texmap/TextureMapper.h:
2343         (WebCore::TextureMapper::clearTexturePool):
2344         * platform/graphics/texmap/TextureMapperGL.cpp:
2345         (WebCore::TextureMapperGL::~TextureMapperGL):
2346
2347 2012-09-28  Julien Chaffraix  <jchaffraix@webkit.org>
2348
2349         REGRESSION(r124168): Null crash in RenderLayer::createScrollbar
2350         https://bugs.webkit.org/show_bug.cgi?id=96863
2351
2352         Reviewed by Abhishek Arya.
2353
2354         After r124168, we synchronously create any overflow:scroll scrollbar on the first style change - we used to wait
2355         until layout was called. The issue is that the logic in RenderLayer assumes that our node is completely attached
2356         when the style change is dispatched. The crash occured because the 'content' image code path in
2357         RenderObject::createObject triggered a style change too early.
2358
2359         Test: scrollbars/scrollbar-content-crash.html
2360
2361         * rendering/RenderObject.cpp:
2362         (WebCore::RenderObject::createObject):
2363         We need a style associated with the new RenderImage to call setImageResource but we don't need to trigger a
2364         style change.
2365
2366 2012-09-28  Ben Wagner  <bungeman@chromium.org>
2367
2368         Chromium should respect 'text-rendering:geometricPrecision' by disabling hinting.
2369         https://bugs.webkit.org/show_bug.cgi?id=97932
2370
2371         Reviewed by Stephen White.
2372
2373         When text-redering:geometricPrecision css property is present, the specification states that hinting should be disabled. This change does so.
2374
2375         This also provides users a more stable and sane means of achieving the result webkit-font-smoothing:antialiased has been providing by accident.
2376         See http://crbug.com/152304 . 
2377
2378         * platform/graphics/skia/FontSkia.cpp:
2379         (WebCore::setupPaint):
2380
2381 2012-09-28  Simon Fraser  <simon.fraser@apple.com>
2382
2383         Crash re-entering Document layout with frame flattening enabled
2384         https://bugs.webkit.org/show_bug.cgi?id=97841
2385
2386         Reviewed by Kenneth Rohde Christiansen.
2387
2388         Walking up to parent FrameViews when doing a frame-flattening
2389         layout should walk via the Frame tree, not the Widget hierarchy.
2390         Walking via the Frame tree ensures that we don't walk up to the
2391         root Frame when laying out a subframe that is in the page cache.
2392         That's bad, because the root Frame is reused for the new
2393         page, and laying it out from a frame in the page cache causes
2394         re-entrant layout.
2395
2396         Test: plugins/frameset-with-plugin-frame.html
2397
2398         * page/FrameView.cpp:
2399         (WebCore::FrameView::parentFrameView):
2400
2401 2012-09-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2402
2403         Unreviewed, rolling out r129911.
2404         http://trac.webkit.org/changeset/129911
2405         https://bugs.webkit.org/show_bug.cgi?id=97933
2406
2407         Inspector test crashes on win debug (Requested by jsbell on
2408         #webkit).
2409
2410         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2411         (WebCore::IDBTransactionBackendImpl::abort):
2412         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
2413
2414 2012-09-28  Yong Li  <yoli@rim.com>
2415
2416         [HarfBuzz] harfbuzz expects log_clusters to have same length as other buffers.
2417         https://bugs.webkit.org/show_bug.cgi?id=97725
2418
2419         Reviewed by Tony Chang.
2420
2421         log_clusters should have same length as other buffers, which is number of glyphs.
2422
2423         Test: fast/text/international/harfbuzz-buffer-overrun.html
2424
2425         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
2426         (WebCore::ComplexTextController::ComplexTextController):
2427         (WebCore::ComplexTextController::~ComplexTextController):
2428         (WebCore::ComplexTextController::deleteGlyphArrays):
2429         (WebCore::ComplexTextController::createGlyphArrays):
2430
2431 2012-09-28  Brian Salomon  <bsalomon@google.com>
2432
2433         Add canvas to set of elements that do not allow style sharing in order to provoke RenderLayer creation
2434         https://bugs.webkit.org/show_bug.cgi?id=97013
2435
2436         Reviewed by James Robinson.
2437
2438         This allows RenderLayers to be created for canvas elements when they are accelerated. Otherwise, we can exit out of RenderObject::setStyle before the layer is created.
2439
2440         Test: fast/canvas/canvas-render-layer.html
2441
2442         * css/StyleResolver.cpp:
2443         (WebCore::StyleResolver::collectMatchingRulesForList):
2444         * rendering/RenderObject.cpp:
2445         (WebCore::RenderObject::adjustStyleDifference):
2446         (WebCore::RenderObject::setStyle):
2447
2448 2012-09-28  Fady Samuel  <fsamuel@chromium.org>
2449
2450         [V8] Make v8NPObjectMap per Context
2451         https://bugs.webkit.org/show_bug.cgi?id=97703
2452
2453         Reviewed by Adam Barth.
2454
2455         V8NPObject is a V8Object wrapper for use by the npruntime.
2456
2457         staticV8NPObjectMap is used for keeping record of V8NPObjects as they are created and destroyed
2458         to ensure that an existing V8NPObject wrapper is returned for a V8Object in npCreateV8ScriptObject.
2459         
2460         Once a context is gone, the NPObjects for the context are no longer valid and that record keeping
2461         no longer makes sense so we clear the map.
2462
2463         However, because the map was static, it existed for all pages across contexts. Clearing the
2464         map if one context is gone should not impact the V8NPObject map of other contexts.
2465
2466         Thus, this patch makes the V8NPObject map per context.
2467
2468         * bindings/v8/NPV8Object.cpp:
2469         (WebCore::freeV8NPObject):
2470         (WebCore::npCreateV8ScriptObject):
2471         * bindings/v8/V8PerContextData.h:
2472         (WebCore):
2473         (WebCore::V8PerContextData::v8NPObjectMap):
2474         (V8PerContextData):
2475
2476 2012-09-28  Alberto Garcia  <agarcia@igalia.com>
2477
2478         TextureMapperGL: fix -Wsign-compare compilation warning.
2479         https://bugs.webkit.org/show_bug.cgi?id=97928
2480
2481         Reviewed by Martin Robinson.
2482
2483         Use size_t rather than int to iterate over FilterOperations.
2484
2485         * platform/graphics/texmap/TextureMapperGL.cpp:
2486         (WebCore::BitmapTextureGL::applyFilters):
2487
2488 2012-09-28  Anders Carlsson  <andersca@apple.com>
2489
2490         Fix build.
2491
2492         * WebCore.xcodeproj/project.pbxproj:
2493
2494 2012-09-28  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2495
2496         Code inside FrameLoaderClient::canShowMIMEType() implementations can be shared among different WK ports
2497         https://bugs.webkit.org/show_bug.cgi?id=97547
2498
2499         Reviewed by Adam Barth.
2500
2501         Added MIMETypeRegistry::canShowMIMEType() function which should to be used
2502         to detect whether a given MIME type can be shown in a page.
2503
2504         No new tests. No new functionality.
2505
2506         * WebCore.exp.in: Added MIMETypeRegistry::canShowMIMEType(). Removed MIMETypeRegistry functions that no longer need to be exported.
2507         * platform/MIMETypeRegistry.cpp:
2508         (WebCore::MIMETypeRegistry::canShowMIMEType):
2509         (WebCore):
2510         * platform/MIMETypeRegistry.h:
2511         (MIMETypeRegistry):
2512
2513 2012-09-27  Tony Chang  <tony@chromium.org>
2514
2515         flexbox assert fails with auto-sized item with padding
2516         https://bugs.webkit.org/show_bug.cgi?id=97606
2517
2518         Reviewed by Ojan Vafai.
2519
2520         Depending on the denominator of FractionalLayoutUnit, we can lose precision when
2521         converting to a float.  This would cause a rounding error in flex-shrink to trigger an ASSERT.
2522         To avoid this problem in the future, switch to using doubles for flex-shrink and flex-grow
2523         at layout time.  The CSS values themselves are still floats.
2524
2525         Test: css3/flexbox/negative-flex-rounding-assert.html
2526
2527         * rendering/RenderFlexibleBox.cpp:
2528         (WebCore::RenderFlexibleBox::layoutFlexItems): Use doubles for local variables.
2529         (WebCore::RenderFlexibleBox::computeNextFlexLine): Pass in doubles.
2530         (WebCore::RenderFlexibleBox::freezeViolations): Pass in doubles.
2531         (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Pass in doubles.
2532         * rendering/RenderFlexibleBox.h:
2533
2534 2012-09-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2535
2536         Unreviewed, rolling out r129751.
2537         http://trac.webkit.org/changeset/129751
2538         https://bugs.webkit.org/show_bug.cgi?id=97921
2539
2540         Causes crashes on mac and win (Requested by vsevik on
2541         #webkit).
2542
2543         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2544         (WebCore::JSHTMLCanvasElement::getContext):
2545         * bindings/js/JSMainThreadExecState.h:
2546         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
2547         * bindings/js/ScheduledAction.cpp:
2548         (WebCore::ScheduledAction::create):
2549         * bindings/js/ScriptCallStackFactory.cpp:
2550         (WebCore::createScriptCallStackForInspector):
2551         * bindings/js/ScriptCallStackFactory.h:
2552         (WebCore):
2553         * bindings/scripts/CodeGeneratorJS.pm:
2554         (GenerateCallWith):
2555         * bindings/scripts/CodeGeneratorV8.pm:
2556         (GenerateCallWith):
2557         * bindings/scripts/test/JS/JSTestObj.cpp:
2558         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
2559         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
2560         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
2561         * bindings/scripts/test/V8/V8TestObj.cpp:
2562         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
2563         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
2564         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackCallback):
2565         * bindings/v8/ScriptCallStackFactory.cpp:
2566         (WebCore::createScriptCallStackForInspector):
2567         * bindings/v8/ScriptCallStackFactory.h:
2568         (WebCore):
2569         * bindings/v8/ScriptController.cpp:
2570         (WebCore::ScriptController::callFunctionWithInstrumentation):
2571         * bindings/v8/V8DOMWindowShell.cpp:
2572         (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
2573         * bindings/v8/V8WorkerContextEventListener.cpp:
2574         (WebCore::V8WorkerContextEventListener::callListenerFunction):
2575         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2576         (WebCore::WindowSetTimeoutImpl):
2577         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2578         (WebCore::V8HTMLCanvasElement::getContextCallback):
2579         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2580         (WebCore::SetTimeoutOrInterval):
2581         * inspector/Inspector.json:
2582         * inspector/InspectorConsoleAgent.cpp:
2583         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
2584         (WebCore::InspectorConsoleAgent::enable):
2585         (WebCore::InspectorConsoleAgent::disable):
2586         (WebCore::InspectorConsoleAgent::clearMessages):
2587         (WebCore::InspectorConsoleAgent::clearFrontend):
2588         (WebCore::InspectorConsoleAgent::addConsoleMessage):
2589         * inspector/InspectorConsoleAgent.h:
2590         (InspectorConsoleAgent):
2591         * inspector/InspectorController.cpp:
2592         (WebCore::InspectorController::connectFrontend):
2593         (WebCore::InspectorController::disconnectFrontend):
2594         * inspector/InspectorInstrumentation.cpp:
2595         (WebCore):
2596         (WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
2597         * inspector/InspectorInstrumentation.h:
2598         (InspectorInstrumentation):
2599         (WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
2600         * inspector/InspectorRuntimeAgent.cpp:
2601         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
2602         * inspector/InspectorRuntimeAgent.h:
2603         (InspectorRuntimeAgent):
2604         * inspector/PageRuntimeAgent.cpp:
2605         (PageRuntimeAgentState):
2606         (WebCore::PageRuntimeAgent::clearFrontend):
2607         (WebCore::PageRuntimeAgent::restore):
2608         (WebCore::PageRuntimeAgent::setReportExecutionContextCreation):
2609         (WebCore::PageRuntimeAgent::didClearWindowObject):
2610         (WebCore::PageRuntimeAgent::didCreateIsolatedContext):
2611         * inspector/PageRuntimeAgent.h:
2612         (PageRuntimeAgent):
2613         * inspector/WorkerRuntimeAgent.cpp:
2614         (WebCore::WorkerRuntimeAgent::setReportExecutionContextCreation):
2615         (WebCore):
2616         * inspector/WorkerRuntimeAgent.h:
2617         (WorkerRuntimeAgent):
2618         * inspector/front-end/RuntimeModel.js:
2619         (WebInspector.RuntimeModel.prototype._didLoadCachedResources):
2620         * page/DOMWindow.cpp:
2621         (WebCore::DOMWindow::postMessage):
2622
2623 2012-09-28  Kent Tamura  <tkent@chromium.org>
2624
2625         Add parseDateTime, formatDateTime, and dateFormatText to Localizer
2626         https://bugs.webkit.org/show_bug.cgi?id=97885
2627
2628         Reviewed by Kentaro Hara.
2629
2630         This is a preparation to remove LocalizedData.h.
2631
2632         Add the following pure virtual member functions to Localizer.
2633           parseDateTime
2634           formatDateTime
2635           dateFormatText.
2636
2637         We rename existing parse/format functions for type=date in Locale*
2638         classes, and extend their functionality so that they support other
2639         date/time types. They override the new functions of Localizer.
2640
2641         No new tests. This should not change any behavior.
2642
2643         * platform/text/Localizer.h:
2644         (Localizer): Add parseDateTime, formatDateTime, and dateFormatText.
2645
2646         * platform/text/LocaleICU.h:
2647         (LocaleICU):
2648         - Rename parseLocalizedDate to parseDateTime
2649         - Add type argument to parseDateTime
2650         - Rename formatLocalizedDate to formatDateTime
2651         - Rename localizedDateFormatText to dateFormatText
2652         - Make parseDateTime/formatDateTime/dateFormatText virtual.
2653         * platform/text/LocaleICU.cpp:
2654         (WebCore::LocaleICU::parseDateTime):
2655         Renamed. Reject non-date types.
2656         (WebCore::LocaleICU::formatDateTime): ditto.
2657         (WebCore::LocaleICU::dateFormatText): Renamed.
2658         * platform/text/LocalizedDateICU.cpp: Moved some code to LocaleICU.cpp.
2659         (WebCore::parseLocalizedDate):
2660         (WebCore::formatLocalizedDate):
2661
2662         * platform/text/LocaleNone.cpp:
2663         Add empty implementations of parseDateTime, formatDateTime, and
2664         dateFormatText.
2665         (LocaleNone):
2666         (WebCore::LocaleNone::parseDateTime):
2667         (WebCore::LocaleNone::formatDateTime):
2668         (WebCore::LocaleNone::dateFormatText):
2669
2670         * platform/text/LocaleWin.h:
2671         (LocaleWin):
2672         - Rename parseDate to parseDateTime
2673         - Add type argument to parseDateTime
2674         - Rename formatDate to formatDateTime
2675         - Make parseDateTime/formatDateTime/dateFormatText virtual.
2676         * platform/text/LocaleWin.cpp:
2677         (WebCore::LocaleWin::parseDateTime):
2678         Renamed. Reject non-date types.
2679         (WebCore::LocaleWin::formatDateTime): ditto.
2680         * platform/text/LocalizedDateWin.cpp: Moved some code to LocaleWin.cpp.
2681         (WebCore::parseLocalizedDate):
2682         (WebCore::formatLocalizedDate):
2683
2684         * platform/text/mac/LocaleMac.h:
2685         (LocaleMac):
2686         - Rename parseDate to parseDateTime
2687         - Add type argument to parseDateTime
2688         - Rename formatDate to formatDateTime
2689         - Make parseDateTime/formatDateTime/dateFormatText virtual.
2690         * platform/text/mac/LocaleMac.mm:
2691         (WebCore::LocaleMac::parseDateTime):
2692         Renamed. Reject non-date types.
2693         (WebCore::LocaleMac::formatDateTime): ditto.
2694         * platform/text/mac/LocalizedDateMac.cpp: Moved some code to LocaleMac.mm.
2695         (WebCore::parseLocalizedDate):
2696         (WebCore::formatLocalizedDate):
2697
2698 2012-09-28  Joshua Bell  <jsbell@chromium.org>
2699
2700         IndexedDB: Run multiple tasks per transaction tick
2701         https://bugs.webkit.org/show_bug.cgi?id=97738
2702
2703         Reviewed by Tony Chang.
2704
2705         Process multiple tasks from the pending queue(s) when the timer fires. The
2706         task may initiate new tasks that change which queue is active (e.g. indexing
2707         operations) so the loop must re-check each tick which queue to use.
2708
2709         In DumpRenderTree, time to make 20k puts/20k gets dropped from 3.2s to 2.0s (-37%);
2710         in Chromium's content_shell, the time dropped from 8.1s to 4.6s (-42%).
2711
2712         No new tests - just perf improvements, covered by (nearly) all existing IDB tests.
2713
2714         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2715         (WebCore::IDBTransactionBackendImpl::abort): Use takeFirst() to clean up code.
2716         (WebCore::IDBTransactionBackendImpl::taskTimerFired): Process as many tasks as are available.
2717
2718 2012-09-28  Harald Tveit Alvestrand  <harald@alvestrand.no>
2719         
2720         Implement the GetStats interface on PeerConnection
2721         https://bugs.webkit.org/show_bug.cgi?id=95193
2722
2723         Specification:
2724         http://dev.w3.org/2011/webrtc/editor/webrtc-20120920.html
2725
2726         Reviewed by Adam Barth.
2727
2728         The implementation consists of a pure virtual platform object
2729         (RTCStatsRequest) that is implemented in WebCore, and stores
2730         its information in a straightforward data hierarchy.
2731         This patch adds the call path and the storage structures.
2732         It does not add filling in data.
2733
2734         Test: fast/mediastream/RTCPeerConnection-stats.html
2735
2736         * CMakeLists.txt:
2737         * Modules/mediastream/RTCPeerConnection.cpp:
2738         (WebCore::RTCPeerConnection::getStats):
2739         (WebCore):
2740         * Modules/mediastream/RTCPeerConnection.h:
2741         (WebCore):
2742         (RTCPeerConnection):
2743         * Modules/mediastream/RTCPeerConnection.idl:
2744         * Modules/mediastream/RTCStatsCallback.h: Added.
2745         (WebCore):
2746         (RTCStatsCallback):
2747         (WebCore::RTCStatsCallback::~RTCStatsCallback):
2748         * Modules/mediastream/RTCStatsCallback.idl: Added.
2749         * Modules/mediastream/RTCStatsElement.cpp: Added.
2750         (WebCore):
2751         (WebCore::RTCStatsElement::create):
2752         (WebCore::RTCStatsElement::RTCStatsElement):
2753         (WebCore::RTCStatsElement::stat):
2754         * Modules/mediastream/RTCStatsElement.h: Added.
2755         (WebCore):
2756         (RTCStatsElement):
2757         * Modules/mediastream/RTCStatsElement.idl: Added.
2758         * Modules/mediastream/RTCStatsReport.cpp: Added.
2759         (WebCore):
2760         (WebCore::RTCStatsReport::create):
2761         (WebCore::RTCStatsReport::RTCStatsReport):
2762         * Modules/mediastream/RTCStatsReport.h: Added.
2763         (WebCore):
2764         (RTCStatsReport):
2765         (WebCore::RTCStatsReport::local):
2766         (WebCore::RTCStatsReport::remote):
2767         * Modules/mediastream/RTCStatsReport.idl: Added.
2768         * Modules/mediastream/RTCStatsRequestImpl.cpp: Added.
2769         (WebCore):
2770         (WebCore::RTCStatsRequestImpl::create):
2771         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
2772         (WebCore::RTCStatsRequestImpl::~RTCStatsRequestImpl):
2773         (WebCore::RTCStatsRequestImpl::requestSucceeded):
2774         (WebCore::RTCStatsRequestImpl::stop):
2775         (WebCore::RTCStatsRequestImpl::clear):
2776         * Modules/mediastream/RTCStatsRequestImpl.h: Added.
2777         (WebCore):
2778         (RTCStatsRequestImpl):
2779         * Modules/mediastream/RTCStatsResponse.cpp: Added.
2780         (WebCore):
2781         (WebCore::RTCStatsResponse::create):
2782         (WebCore::RTCStatsResponse::RTCStatsResponse):
2783         * Modules/mediastream/RTCStatsResponse.h: Added.
2784         (WebCore):
2785         (RTCStatsResponse):
2786         (WebCore::RTCStatsResponse::result):
2787         * Modules/mediastream/RTCStatsResponse.idl: Added.
2788         * WebCore.gypi:
2789         * platform/chromium/support/WebRTCStatsRequest.cpp: Copied from Source/Platform/chromium/public/WebRTCPeerConnectionHandler.h.
2790         (WebKit):
2791         (WebKit::WebRTCStatsRequest::WebRTCStatsRequest):
2792         (WebKit::WebRTCStatsRequest::assign):
2793         (WebKit::WebRTCStatsRequest::reset):
2794         (WebKit::WebRTCStatsRequest::requestSucceeded):
2795         * platform/mediastream/RTCPeerConnectionHandler.h:
2796         (WebCore):
2797         (RTCPeerConnectionHandler):
2798         * platform/mediastream/RTCStatsRequest.h: Copied from Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h.
2799         (WebCore):
2800         (RTCStatsRequest):
2801         (WebCore::RTCStatsRequest::~RTCStatsRequest):
2802         (WebCore::RTCStatsRequest::RTCStatsRequest):
2803         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
2804         (WebCore::RTCPeerConnectionHandlerChromium::getStats):
2805         (WebCore):
2806         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
2807         (RTCPeerConnectionHandlerChromium):
2808
2809 2012-09-28  Andreas Kling  <kling@webkit.org>
2810
2811         471kB below StyleSheetContents::parserAppendRule() on Membuster3.
2812         <http://webkit.org/b/97916>
2813
2814         Reviewed by Anders Carlsson.
2815
2816         Shrink-to-fit the StyleSheetContents rule vectors at the end of CSSParser::parseSheet().
2817         ~100kB progression on Membuster3.
2818
2819         * css/StyleSheetContents.h:
2820         * css/StyleSheetContents.cpp:
2821         (WebCore::StyleSheetContents::shrinkToFit):
2822         * css/CSSParser.cpp:
2823         (WebCore::CSSParser::parseSheet):
2824
2825 2012-09-28  Kent Tamura  <tkent@chromium.org>
2826
2827         Clean up Localizer-related functions
2828         https://bugs.webkit.org/show_bug.cgi?id=97899
2829
2830         Reviewed by Kentaro Hara.
2831
2832         - Rename Document::getLocalizer to getCachedLocalizer
2833         - Add default argument to getCachedLocalizer
2834         - Add Element::localizer to reduce code size
2835         - Rename DateTimeNumericFieldElement::localizer to localizerForOwner to
2836           avoid conflict with Element::localizer
2837         - Add Localizer::createDefault to improve code readability
2838
2839         No new tests. This shouldn't make any behavior change.
2840
2841         * dom/Document.h:
2842         (Document): Rename getLocalizer to getCachedLocalizer, and add default
2843         argument.
2844         * dom/Document.cpp:
2845         (WebCore::Document::getCachedLocalizer): ditto.
2846
2847         * dom/Element.h:
2848         (Element): Add localizer function.
2849         * dom/Element.cpp:
2850         (WebCore::Element::localizer): Added
2851
2852         * html/shadow/DateTimeNumericFieldElement.h:
2853         (DateTimeNumericFieldElement): Rename localizer to localizerForOwner.
2854         * html/shadow/DateTimeNumericFieldElement.cpp: ditto.
2855         (WebCore::DateTimeNumericFieldElement::handleKeyboardEvent):
2856         (WebCore::DateTimeNumericFieldElement::localizerForOwner):
2857         (WebCore::DateTimeNumericFieldElement::value):
2858
2859         * platform/text/Localizer.h:
2860         (Localizer): Add createDefault
2861         (WebCore::Localizer::createDefault): Implemented.
2862
2863         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2864         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue):
2865         Use Element::localizer.
2866         * html/NumberInputType.cpp:
2867         (WebCore::NumberInputType::localizeValue): ditto.
2868         (WebCore::NumberInputType::convertFromVisibleValue): ditto.
2869
2870 2012-09-28  Pavel Feldman  <pfeldman@chromium.org>
2871
2872         Web Inspector: define ChunkedReader interface for compilation
2873         https://bugs.webkit.org/show_bug.cgi?id=97904
2874
2875         Reviewed by Alexander Pavlov.
2876
2877         Otherwise, it is unclear what "source" is in the OutputStreamDelegate.
2878
2879         * inspector/front-end/FileUtils.js:
2880         (WebInspector.OutputStreamDelegate.prototype.onTransferStarted):
2881         (WebInspector.OutputStreamDelegate.prototype.onTransferFinished):
2882         (WebInspector.OutputStreamDelegate.prototype.onChunkTransferred):
2883         (WebInspector.OutputStreamDelegate.prototype.onError):
2884         (WebInspector.ChunkedReader):
2885         (WebInspector.ChunkedReader.prototype.fileSize):
2886         (WebInspector.ChunkedReader.prototype.loadedSize):
2887         (WebInspector.ChunkedReader.prototype.fileName):
2888         (WebInspector.ChunkedReader.prototype.cancel):
2889         (WebInspector.ChunkedFileReader.prototype.start):
2890         (WebInspector.ChunkedFileReader.prototype._onChunkLoaded):
2891         (WebInspector.ChunkedXHRReader.prototype.start):
2892         (WebInspector.ChunkedXHRReader.prototype._onLoad):
2893         * inspector/front-end/HeapSnapshotView.js:
2894         (WebInspector.HeapSnapshotLoadFromFileDelegate.prototype.onTransferStarted):
2895         (WebInspector.HeapSnapshotLoadFromFileDelegate.prototype.onChunkTransferred):
2896         (WebInspector.HeapSnapshotLoadFromFileDelegate.prototype.onTransferFinished):
2897         (WebInspector.HeapSnapshotLoadFromFileDelegate.prototype.onError):
2898         * inspector/front-end/TimelineModel.js:
2899         (WebInspector.TimelineModelLoadFromFileDelegate.prototype.onTransferStarted):
2900
2901 2012-09-28  Florin Malita  <fmalita@chromium.org>
2902
2903         [Chromium] Incorrect resampling of clipped/masked images.
2904         https://bugs.webkit.org/show_bug.cgi?id=97409
2905
2906         Reviewed by Stephen White.
2907
2908         Currently, high-quality resampling is used for translate/scale-only transforms, but when
2909         the scale is negative the resampling subset ends up positioned incorrectly.
2910         ImageSkia.cpp:drawResampledBitmap needs to account for negative scaling factors, and apply
2911         only absolute values when calculating the resampling subregion in bitmap coordinates.
2912
2913         Thanks pdr@google.com for isolating the regression.
2914
2915         Test: svg/custom/clip-mask-negative-scale.svg
2916
2917         * platform/graphics/skia/ImageSkia.cpp:
2918         (WebCore::drawResampledBitmap):
2919
2920 2012-09-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2921
2922         Unreviewed, rolling out r129882.
2923         http://trac.webkit.org/changeset/129882
2924         https://bugs.webkit.org/show_bug.cgi?id=97913
2925
2926         Repaint is incorrect on many tests (Requested by schenney on
2927         #webkit).
2928
2929         * inspector/InspectorController.cpp:
2930         * inspector/InspectorController.h:
2931         (WebCore):
2932         (InspectorController):
2933         * inspector/InspectorOverlay.cpp:
2934         (WebCore::InspectorOverlay::paint):
2935         (WebCore::InspectorOverlay::update):
2936         (WebCore::buildObjectForPoint):
2937         (WebCore::buildArrayForQuad):
2938         (WebCore::buildObjectForHighlight):
2939         (WebCore::InspectorOverlay::reset):
2940         * inspector/InspectorOverlay.h:
2941         (InspectorOverlay):
2942         * inspector/InspectorOverlayPage.html:
2943
2944 2012-09-28  Kentaro Hara  <haraken@chromium.org>
2945
2946         Unreviewed, rolling out r129825.
2947         http://trac.webkit.org/changeset/129825
2948         https://bugs.webkit.org/show_bug.cgi?id=97474
2949
2950         DOMWindow.resizeTo() is broken. Asked by Mark Pilgrim.
2951
2952         * WebCore.gypi:
2953         * platform/Widget.h:
2954         * platform/chromium/PageClientChromium.h: Removed.
2955         * platform/chromium/PlatformScreenChromium.cpp:
2956         (WebCore::screenHorizontalDPI):
2957         (WebCore::screenVerticalDPI):
2958         (WebCore::screenDepth):
2959         (WebCore::screenDepthPerComponent):
2960         (WebCore::screenIsMonochrome):
2961         (WebCore::screenRect):
2962         (WebCore::screenAvailableRect):
2963         * platform/chromium/PlatformSupport.h:
2964         (PlatformSupport):
2965
2966 2012-09-28  Christophe Dumez  <christophe.dumez@intel.com>
2967
2968         [WebDatabase] Error code should be CONSTRAINT_ERR if a statement fails due to a constraint failure
2969         https://bugs.webkit.org/show_bug.cgi?id=97897
2970
2971         Reviewed by Kenneth Rohde Christiansen.
2972
2973         Use CONSTRAINT_ERR error code instead of the generic DATABASE_ERR
2974         when a statement fails due to a constraint failure. This is documented
2975         in the W3C specification:
2976         http://dev.w3.org/html5/webdatabase/#dom-sqlexception-code-constraint
2977
2978         Tests: storage/websql/sql-error-codes.html
2979
2980         * Modules/webdatabase/SQLStatement.cpp:
2981         (WebCore::SQLStatement::execute):
2982         * Modules/webdatabase/SQLStatementSync.cpp:
2983         (WebCore::SQLStatementSync::execute):
2984         * platform/sql/SQLiteDatabase.cpp:
2985         (WebCore):
2986         * platform/sql/SQLiteDatabase.h:
2987         (WebCore):
2988
2989 2012-09-28  Pavel Feldman  <pfeldman@chromium.org>
2990
2991         Web Inspector: split ProgressBar.js into Progress.js and ProgressIndicator.js
2992         https://bugs.webkit.org/show_bug.cgi?id=97902
2993
2994         Reviewed by Alexander Pavlov.
2995
2996         One is model, the other is UI component.
2997
2998         * WebCore.gypi:
2999         * WebCore.vcproj/WebCore.vcproj:
3000         * inspector/compile-front-end.py:
3001         * inspector/front-end/Progress.js: Copied from Source/WebCore/inspector/front-end/ProgressBar.js.
3002         * inspector/front-end/ProgressIndicator.js: Renamed from Source/WebCore/inspector/front-end/ProgressBar.js.
3003         * inspector/front-end/UserAgentSupport.js:
3004         * inspector/front-end/WebKit.qrc:
3005         * inspector/front-end/externs.js:
3006         * inspector/front-end/inspector.html:
3007
3008 2012-09-27  Alexander Pavlov  <apavlov@chromium.org>
3009
3010         Web Inspector: [Device Metrics] Remove the gutter overlay moving its functionality into the InspectorOverlay
3011         https://bugs.webkit.org/show_bug.cgi?id=97799
3012
3013         Reviewed by Pavel Feldman.
3014
3015         In order to reduce the amount of port-specific code, the gutter overlay painted in the device metrics emulation mode
3016         has been replaced by the respective functionality in the HTML-based InspectorOverlay in WebCore. The InspectorOverlay
3017         now covers the entire WebView rather than the FrameView only.
3018
3019         * inspector/InspectorController.cpp:
3020         (WebCore::InspectorController::webViewResized):
3021         (WebCore):
3022         * inspector/InspectorController.h:
3023         (WebCore):
3024         (InspectorController):
3025         * inspector/InspectorOverlay.cpp:
3026         (WebCore::InspectorOverlay::InspectorOverlay):
3027         (WebCore::InspectorOverlay::paint):
3028         (WebCore::InspectorOverlay::resize):
3029         (WebCore):
3030         (WebCore::InspectorOverlay::update):
3031         (WebCore::InspectorOverlay::drawGutter):
3032         (WebCore::InspectorOverlay::reset):
3033         * inspector/InspectorOverlay.h:
3034         (InspectorOverlay):
3035         * inspector/InspectorOverlayPage.html: Introduce the gutter painting functionality previously found in the Chromium's
3036         DeviceMetricsSupport class, which used to implement WebPageOverlay.
3037
3038 2012-09-28  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
3039
3040         editing/pasteboard/paste-removing-iframe.html crashes on EFL bots
3041         https://bugs.webkit.org/show_bug.cgi?id=97892
3042
3043         Reviewed by Kenneth Rohde Christiansen.
3044
3045         Added missing null check to avoid a crash if the document inside
3046         iframe is removed during the editing operation.
3047
3048         Test: editing/pasteboard/paste-removing-iframe.html
3049
3050         * editing/Editor.cpp:
3051         (WebCore::Editor::changeSelectionAfterCommand):
3052
3053 2012-09-28  Arvid Nilsson  <anilsson@rim.com>
3054
3055         [BlackBerry] Destroy thread-specific data for Platform::Graphics::Buffer on the right thread
3056         https://bugs.webkit.org/show_bug.cgi?id=97674
3057
3058         Reviewed by Rob Buis.
3059
3060         A new API was added to BlackBerry::Platform::Graphics for destroying
3061         thread-specific data generated on the compositing thread when we blit
3062         buffers. The buffers are otherwise created and destroyed on the WebKit
3063         thread, which doesn't give platform any opportunity to destroy the
3064         thread-specific data.
3065
3066         This patch adds calls to the new API to avoid leaking resources.
3067
3068         Reviewed internally by Jakob Petsovits and Filip Spacek.
3069
3070         PR 214644
3071
3072         Verified using manual testing.
3073
3074         * plugins/blackberry/PluginViewPrivateBlackBerry.cpp:
3075         (WebCore::PluginViewPrivate::createBuffers):
3076         (WebCore::PluginViewPrivate::destroyBuffers):
3077
3078 2012-09-28  Andrey Adaikin  <aandrey@chromium.org>
3079
3080         Web Inspector: [Canvas] log property setters too along with function calls
3081         https://bugs.webkit.org/show_bug.cgi?id=97776
3082
3083         Reviewed by Pavel Feldman.
3084
3085         Trace logs should also contain property setter calls.
3086
3087         * inspector/InjectedScriptCanvasModuleSource.js:
3088         (.):
3089         * inspector/Inspector.json:
3090         * inspector/front-end/CanvasProfileView.js:
3091         (WebInspector.CanvasProfileView.prototype._showTraceLog):
3092
3093 2012-09-28  Kent Tamura  <tkent@chromium.org>
3094
3095         Remove LocalizedNumber*.*
3096         https://bugs.webkit.org/show_bug.cgi?id=97876
3097
3098         Reviewed by Yuta Kitamura.
3099
3100         LocalizedNumber.h functions are replaced with Localizer class.
3101
3102         * CMakeLists.txt: Remove LocalizedNumberNone.*.
3103         * GNUmakefile.list.am: ditto.
3104         * Target.pri: ditto.
3105         * WebCore.vcpproj/WebCore.vcproj: ditto.
3106         * WebCore.gyp/WebCore.gyp: Remove LocalizedNumber*.*.
3107         * WebCore.gypi: ditto.
3108         * WebCore.xcodeproj/project.pbxproj: ditto.
3109
3110         * html/NumberInputType.cpp: Use Localizer for the element locale.
3111         (WebCore::NumberInputType::localizeValue):
3112         (WebCore::NumberInputType::convertFromVisibleValue):
3113
3114         * platform/text/Localizer.h: Move some comments from LocalizedNumber.h
3115
3116         * platform/text/LocalizedNumber.h: Removed.
3117         * platform/text/LocalizedNumberICU.cpp: Removed.
3118         * platform/text/LocalizedNumberNone.cpp: Removed.
3119         * platform/text/mac/LocalizedNumberMac.mm: Removed.
3120         * platform/text/win/LocalizedNumberWin.cpp: Removed.
3121
3122 2012-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3123
3124         Unreviewed, rolling out r129863.
3125         http://trac.webkit.org/changeset/129863
3126         https://bugs.webkit.org/show_bug.cgi?id=97173
3127
3128         WK2 layout test on debug is broken by this patch.
3129
3130         * platform/efl/RunLoopEfl.cpp:
3131         (WebCore::RunLoop::RunLoop):
3132         (WebCore::RunLoop::~RunLoop):
3133
3134 2012-09-28  Vsevolod Vlasov  <vsevik@chromium.org>
3135
3136         Web Inspector: Formatting on load is broken
3137         https://bugs.webkit.org/show_bug.cgi?id=97880
3138
3139         Reviewed by Alexander Pavlov.
3140
3141         Bound formatted callback on UISourceCode and fixed callback call.
3142
3143         * inspector/front-end/UISourceCode.js:
3144         (WebInspector.UISourceCode.prototype._fireContentAvailable.formattedCallback):
3145         (WebInspector.UISourceCode.prototype._fireContentAvailable):
3146
3147 2012-09-28  Yoshifumi Inoue  <yosin@chromium.org>
3148
3149         [Forms] Multiple fields month input UI
3150         https://bugs.webkit.org/show_bug.cgi?id=97299
3151
3152         Reviewed by Kent Tamura.
3153
3154         This patch introduces multiple fields "month" input UI in DRT. We'll
3155         enable this feature once we add tests.
3156
3157         Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_MONTH
3158         and ENABLE_INPUT_MULTIPLE_FIELDS_UI.
3159
3160         No new tests. To reduce size of this patch, other patches add tests
3161         for multiple fields month input UI.
3162
3163         Note: Actual outputs of two tests
3164             - fast/forms/month/month-input-visible-string.html
3165             - fast/forms/month/month-stepup-stepdown-from-renderer.html
3166         are different.
3167
3168         * css/html.css:
3169         (input::-webkit-datetime-edit-month-field): Added for field appearance.
3170         (input::-webkit-datetime-edit-year-field): ditto.
3171         (input::-webkit-datetime-edit-month-field:focus): Added to remove focus ring.
3172         (input::-webkit-datetime-edit-year-field:focus): ditto.
3173         * html/MonthInputType.cpp:
3174         (WebCore::MonthInputType::formatDateTimeFieldsState): Added to format numeric value to string value as specified in HTML5 specification.
3175         (WebCore::MonthInputType::setupLayoutParameters): Added to set layout of multiple fields.
3176         * html/MonthInputType.h: Changed to include BaseMultipleFieldsDateAndTimeInputType.h and introduce BaseMonthInputType typedef.
3177         (WebCore::MonthInputType::MonthInputType): Changed base class name to BaseMonthInputType.
3178         (MonthInputType): Changed to add declarations for formatDateTimeFieldsState() and setupLayoutParameters().
3179         * html/shadow/DateTimeEditElement.cpp:
3180         (DateTimeEditBuilder): Changed to have copy of object in m_stepRange and m_dateValue member variables for being robust.
3181         (WebCore::DateTimeEditBuilder::DateTimeEditBuilder): Changed to add initialize m_placeholderForMonth and m_placeholderForYear.
3182         (WebCore::DateTimeEditBuilder::visitField): Changed to support month field and year field.
3183         * html/shadow/DateTimeEditElement.h:
3184         (LayoutParameters): Changed to add member variables, placeholderForMonth and placeholderForYear. Changed to have copy of object in stepRange member variable for being robust.
3185
3186 2012-09-28  Eunmi Lee  <eunmi15.lee@samsung.com>
3187
3188         [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
3189         https://bugs.webkit.org/show_bug.cgi?id=97173
3190
3191         Reviewed by Gyuyoung Kim.
3192
3193         Remove codes to initialize and shutdown the EFL libraries from
3194         RunLoopEfl.cpp. Initialization and shutdown will be done in the
3195         ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web
3196         process.
3197
3198         No new tests. This patch doesn't change behavior.
3199
3200         * platform/efl/RunLoopEfl.cpp:
3201         (WebCore::RunLoop::RunLoop):
3202         (WebCore::RunLoop::~RunLoop):
3203
3204 2012-09-19  Vsevolod Vlasov  <vsevik@chromium.org>
3205
3206         Web Inspector: Prepare UISourceCode to transformation into File.
3207         https://bugs.webkit.org/show_bug.cgi?id=97113
3208
3209         Reviewed by Pavel Feldman.
3210
3211         This patch moves methods and fields from UISourceCode descendants except for the modification bindings.
3212
3213         * inspector/front-end/BreakpointManager.js:
3214         (WebInspector.BreakpointManager.breakpointStorageId):
3215         (WebInspector.BreakpointManager.isDivergedFromVM):
3216         (WebInspector.BreakpointManager.prototype.restoreBreakpoints):
3217         (WebInspector.BreakpointManager.Breakpoint):
3218         (WebInspector.BreakpointManager.Breakpoint.prototype._updateBreakpoint):
3219         (WebInspector.BreakpointManager.Breakpoint.prototype._breakpointStorageId):
3220         (WebInspector.BreakpointManager.Storage.prototype._restoreBreakpoints):
3221         (set WebInspector.BreakpointManager.Storage.Item):
3222         * inspector/front-end/JavaScriptSource.js:
3223         (WebInspector.JavaScriptSource):
3224         (WebInspector.JavaScriptSource.prototype.workingCopyCommitted):
3225         * inspector/front-end/JavaScriptSourceFrame.js:
3226         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
3227         (WebInspector.JavaScriptSourceFrame.prototype._supportsEnabledBreakpointsWhileEditing):
3228         (WebInspector.JavaScriptSourceFrame.prototype._didEditContent):
3229         (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointsBeforeEditing):
3230         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
3231         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
3232         (WebInspector.JavaScriptSourceFrame.prototype._handleGutterClick):
3233         * inspector/front-end/SASSSourceMapping.js:
3234         * inspector/front-end/ScriptSnippetModel.js:
3235         (WebInspector.ScriptSnippetModel):
3236         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
3237         (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet.get var):
3238         (WebInspector.ScriptSnippetModel.prototype._projectWillReset):
3239         (WebInspector.SnippetJavaScriptSource):
3240         (WebInspector.SnippetJavaScriptSource.prototype.workingCopyChanged):
3241         * inspector/front-end/ScriptsNavigator.js:
3242         (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
3243         * inspector/front-end/ScriptsPanel.js:
3244         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
3245         (WebInspector.ScriptsPanel.prototype._uiSourceCodeFormatted):
3246         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
3247         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
3248         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
3249         * inspector/front-end/StyleSource.js:
3250         * inspector/front-end/UISourceCode.js:
3251         (WebInspector.UISourceCode.prototype.searchInContent):
3252         (WebInspector.UISourceCode.prototype._fireContentAvailable.formattedCallback):
3253         (WebInspector.UISourceCode.prototype._fireContentAvailable):
3254         (WebInspector.UISourceCode.prototype.setFormatted.if):
3255         (WebInspector.UISourceCode.prototype.setFormatted.didGetContent.formattedChanged):
3256         (WebInspector.UISourceCode.prototype.setFormatted.didGetContent):
3257         (WebInspector.UISourceCode.prototype.setFormatted):
3258         (WebInspector.UISourceCode.prototype.setSourceMapping):
3259
3260 2012-09-28  MORITA Hajime  <morrita@google.com>
3261
3262         Move Shadow DOM inspection feature out from experiments
3263         https://bugs.webkit.org/show_bug.cgi?id=94274
3264
3265         Reviewed by Pavel Feldman.
3266
3267         This chagne turns the showShadowDOM experiments into a settings,
3268         adding aSettingsScreen entry for that.
3269
3270         * English.lproj/localizedStrings.js:
3271         * inspector/front-end/DOMAgent.js:
3272         * inspector/front-end/Settings.js:
3273         (WebInspector.ExperimentsSettings):
3274         * inspector/front-end/SettingsScreen.js:
3275         (WebInspector.GenericSettingsTab):
3276
3277 2012-09-27  Kent Tamura  <tkent@chromium.org>
3278
3279         Use Localizer in PagePopupController
3280         https://bugs.webkit.org/show_bug.cgi?id=97862
3281
3282         Reviewed by Hajime Morita.
3283
3284         No new tests. This doesn't change any behavior.
3285
3286         * page/PagePopupClient.h:
3287         (WebCore):
3288         (PagePopupClient): Add "localizer" member function.
3289         * page/PagePopupController.cpp:
3290         (WebCore::PagePopupController::localizeNumberString):
3291         Use a Localizer object provided by PagePopupClient.
3292
3293 2012-09-28  Kent Tamura  <tkent@chromium.org>
3294
3295         Switch monthLabels, weekDayShortLabels, and firstDayOfWeek to Localizer
3296         https://bugs.webkit.org/show_bug.cgi?id=97874
3297
3298         Reviewed by Kentaro Hara.
3299
3300         No new tests. This change shouldn't change any behavior.
3301
3302         * platform/text/Localizer.h:
3303         (Localizer): Add monthLabels, weekDayShortLabels, and firstDayOfWeek.
3304         * platform/text/LocalizedDate.h:
3305         (WebCore): Remove them.
3306         * platform/text/LocalizedDateICU.cpp:
3307         (WebCore::localizedDateFormatText): ditto.
3308         * platform/text/LocalizedDateWin.cpp:
3309         (WebCore::localizedDateFormatText): ditto.
3310         * platform/text/mac/LocalizedDateMac.cpp:
3311         (WebCore::localizedDateFormatText): ditto.
3312
3313         * platform/text/LocaleICU.h:
3314         (LocaleICU): Add virtual and OVERRIDE.
3315         * platform/text/LocaleWin.h:
3316         (LocaleWin):
3317         - Add virtual and OVERRIDE.
3318         - Move the content of firstDayOfWeek to LocaleWin.cpp because inline
3319         definition of a virtual function is not efficient.
3320         * platform/text/LocaleWin.cpp:
3321         (WebCore::LocaleWin::firstDayOfWeek): See above.
3322         * platform/text/mac/LocaleMac.h:
3323         (LocaleMac): Add virtual and OVERRIDE.
3324
3325 2012-09-28  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3326
3327         Web Inspector: Elements: Show entities in edit as HTML.
3328         https://bugs.webkit.org/show_bug.cgi?id=97798
3329
3330         Reviewed by Alexander Pavlov.
3331
3332         In elements tree entities like "&emsp;", "&ensp;" are shown.
3333         But in "Edit as HTML" mode they are replaced by Unicode chars.
3334
3335         For better consistency, these chars should be rendered the same
3336         way both in tree and edit field.
3337
3338         * inspector/front-end/ElementsTreeOutline.js:
3339         Replaced invisible chars with entities.
3340
3341 2012-09-28  Yoshifumi Inoue  <yosin@chromium.org>
3342
3343         [Forms] Adding DateTimeMonthFieldElement and DateTimeYearFieldElement
3344         https://bugs.webkit.org/show_bug.cgi?id=97864
3345
3346         Reviewed by Kent Tamura.
3347
3348         This patch is a part of preparation of implementing multiple fields
3349         date/time input UI.
3350
3351         This patch introduces DateTimeMonthFieldElement and DateTimeYearFieldElement
3352         classes for implementing multiple fields "month" input type.
3353
3354         Multiple fields "month" input type uses two fields for month and year
3355         in locale dependent order. Month field display month as two digit.
3356         Year field display year as four digits in usual case and can display
3357         up to 6 digits to support maximum year 275760, defined in HTML5
3358         specification.
3359
3360         This patch also changes default value for step down and up on empty
3361         field to better UI in year field. Year field displays current year
3362         when step down and up on empty field rather than minimum year 1, or
3363         maximum year 275760.
3364
3365         Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME
3366         and ENABLE_INPUT_MULTIPLE_FIELDS_UI.
3367
3368         No new tests. This patch doesn't change behavior.
3369
3370         * html/shadow/DateTimeFieldElements.cpp:
3371         (WebCore::DateTimeMonthFieldElement::DateTimeMonthFieldElement): Added.
3372         (WebCore::DateTimeMonthFieldElement::create): Added.
3373         (WebCore::DateTimeMonthFieldElement::populateDateTimeFieldsState): Added.
3374         (WebCore::DateTimeMonthFieldElement::setValueAsDate): Added.
3375         (WebCore::DateTimeMonthFieldElement::setValueAsDateTimeFieldsState): Added.
3376         (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement): Added.
3377         (WebCore::DateTimeYearFieldElement::create): Added.
3378         (WebCore::DateTimeYearFieldElement::defaultValueForStepDown): Added.
3379         (WebCore::DateTimeYearFieldElement::defaultValueForStepUp): Added.
3380         (WebCore::DateTimeYearFieldElement::populateDateTimeFieldsState): Added.
3381         (WebCore::DateTimeYearFieldElement::setValueAsDate): Added.
3382         (WebCore::DateTimeYearFieldElement::setValueAsDateTimeFieldsState): Added.
3383         * html/shadow/DateTimeFieldElements.h:
3384         (DateTimeMonthFieldElement): Added.
3385         (DateTimeYearFieldElement): Added.
3386         * html/shadow/DateTimeNumericFieldElement.cpp:
3387         (WebCore::DateTimeNumericFieldElement::Range::isInRange): Added for ease of checking value is in range.
3388         (WebCore::DateTimeNumericFieldElement::defaultValueForStepDown): Added for default behavior.
3389         (WebCore::DateTimeNumericFieldElement::defaultValueForStepUp): ditto.
3390         (WebCore::DateTimeNumericFieldElement::stepDown): Changed to use defaultValueForStepDown instead of maximum field value.
3391         (WebCore::DateTimeNumericFieldElement::stepUp):  Changed to use defaultValueForStepUp minium field value.
3392         (WebCore::DateTimeNumericFieldElement::value): Changed to use "%04d" when maximum field value is greater than 999 for year field.
3393         * html/shadow/DateTimeNumericFieldElement.h:
3394         (DateTimeNumericFieldElement): Changed to add declarations of defaultValueForStepDown() and defaultValueForStepUp().
3395
3396 2012-09-27  Yoshifumi Inoue  <yosin@chromium.org>
3397
3398         [Forms] Adding placeholder feature to DateTimeNumericElement, and update its existing subclasses.
3399         https://bugs.webkit.org/show_bug.cgi?id=97863
3400
3401         Reviewed by Kent Tamura.
3402
3403         This patch is a part of preparation of implementing multiple fields
3404         date/time input UI.
3405
3406         This patch introduces placeholder feature to DateTimeNumericElement
3407         to display date format guide in field, e.g. displaying "dd/mm/yyyy".
3408
3409         Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
3410         ENABLE_INPUT_MULTIPLE_FIELDS_UI.
3411
3412         No new tests. This patch doesn't change behavior.
3413
3414         * html/shadow/DateTimeFieldElements.cpp:
3415         (WebCore::DateTimeHourFieldElement::DateTimeHourFieldElement): Changed to pass placeholder class to base class.
3416         (WebCore::DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement): ditto
3417         (WebCore::DateTimeMinuteFieldElement::DateTimeMinuteFieldElement): ditto
3418         (WebCore::DateTimeSecondFieldElement::DateTimeSecondFieldElement): ditto
3419         * html/shadow/DateTimeNumericFieldElement.cpp: Removed no more needed static function displaySizeOfNumbre().
3420         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): Changed to add new parameter to take placeholder.
3421         (WebCore::DateTimeNumericFieldElement::visibleValue): Changed to use m_placholder.
3422         * html/shadow/DateTimeNumericFieldElement.h:
3423         (DateTimeNumericFieldElement): Changed to add a member variable m_placholder to hold placholder to DateTimeNumbericElement class.
3424
3425 2012-09-27  Kent Tamura  <tkent@chromium.org>
3426
3427         Make sure Localizer class is not copyable
3428         https://bugs.webkit.org/show_bug.cgi?id=97857
3429
3430         Reviewed by Kentaro Hara.
3431
3432         We don't intent Localizer obejcts are copyable.
3433
3434         * platform/text/Localizer.h:
3435         (Localizer): Add WTF_MAKE_NONCOPYABLE.
3436
3437 2012-09-27  Nico Weber  <thakis@chromium.org>
3438
3439         Delete some unused code. Found by -Wunused-function.
3440         https://bugs.webkit.org/show_bug.cgi?id=97858
3441
3442         Reviewed by Anders Carlsson.
3443
3444         No intended behavior change.
3445
3446         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
3447         (WebCore):
3448         * platform/graphics/chromium/CrossProcessFontLoading.mm:
3449         * platform/graphics/skia/GraphicsContextSkia.cpp:
3450         * platform/mac/ScrollbarThemeMac.mm:
3451         (WebCore):
3452
3453 2012-09-27  Kentaro Hara  <haraken@chromium.org>
3454
3455         [V8] StringCache::v8ExternalString() can return a stale persistent handle
3456         https://bugs.webkit.org/show_bug.cgi?id=97767
3457
3458         Reviewed by Adam Barth.
3459
3460         For details, see the Chromium bug: http://code.google.com/p/chromium/issues/detail?id=151902
3461
3462         StringCache::v8ExternalString() can return a stale persistent handle
3463         in the following scenario:
3464
3465         (1) Assume that StringImpl A with value "foo" is in m_stringCache.
3466         (2) StringImpl B with value "foo" is accessed. At this point, m_lastStringImpl
3467         points to B, and m_lastV8String points to B's handle.
3468         (3) A minor GC is triggered and a weak callback is called back for StringImpl A.
3469         At this point, "foo" is removed from m_stringCache. A's handle is disposed.
3470         However, m_lastV8String is not cleared because m_lastStringImpl (i.e. StringImpl B)
3471         is not equal to StringImpl A. As a result, m_lastV8String points to a stale
3472         persistent handle.
3473         (4) The persistent handle is eventually reused in V8 and made weak again.
3474         (5) StringImpl B with value "foo" is accessed. Then StringCache::v8ExternalString()
3475         returns the stale persistent handle, which is already used for another purpose.
3476
3477         To solve the problem, we need to clear m_stringImpl and m_lastV8String when any
3478         string wrapper is disposed. Specifically, we need to change the code like this:
3479
3480           static void cachedStringCallback(v8::Persistent<v8::Value> wrapper, void* parameter)
3481           {
3482             StringImpl* stringImpl = static_cast<StringImpl*>(parameter);
3483             V8PerIsolateData::current()->stringCache()->remove(stringImpl);
3484             wrapper.Dispose();
3485             stringImpl->deref();
3486           }
3487
3488           void StringCache::remove(StringImpl* stringImpl)
3489           {
3490             m_stringCache.remove(stringImpl);
3491             if (m_lastStringImpl.get() == stringImpl) {  // Remove this line.
3492                 m_lastStringImpl = 0;
3493                 m_lastV8String.Clear();
3494             }
3495           }
3496
3497         Note: Removing the line might be stronger than is needed. Instead of removing
3498         the line, we can just replace the line with 'if (m_lastV8String == wrapper)'.
3499         However, just in case (for correctness), I'd prefer removing the line.
3500         Given that GC won't happen so frequently, clearing the cache in every weak callback
3501         won't affect performance.
3502
3503         No tests because it depends on the GC behavior and I couldn't reproduce the bug.
3504
3505         * bindings/v8/V8ValueCache.cpp:
3506         (WebCore::StringCache::remove):
3507
3508 2012-09-26  Antti Koivisto  <antti@apple.com>
3509
3510         CSSComputedStyleDeclaration::getPropertyCSSValue() triggering unnecessary relayouts and style recalcs
3511         https://bugs.webkit.org/show_bug.cgi?id=97760
3512
3513         Reviewed by Andreas Kling.
3514
3515         Currently getPropertyCSSValue() (which is also used to implement the more common getPropertyValue()) 
3516         calls Document::updateLayoutIgnorePendingStylesheets() unconditionally. However only a few properties 
3517         are actually layout dependent, making many of these relayouts unnecessary. Moreover, triggering full 
3518         style recalc is also often unnecessary as the current node may already have valid style even if some 
3519         other parts of the tree require recalc.
3520         
3521         - Only trigger relayouts for layout dependent properties.
3522         - Trigger style recalc only if the style of the current element or its ancestors is dirty.
3523         
3524         This is a significant (several percent) progression on some real world web content based page loading
3525         benchmarks.
3526
3527         * css/CSSComputedStyleDeclaration.cpp:
3528         (WebCore::isLayoutDependentProperty):
3529         (WebCore):
3530         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3531         * css/StyleResolver.h:
3532         (WebCore::StyleResolver::hasViewportDependentMediaQueries):
3533         * dom/Document.cpp:
3534         (WebCore::Document::hasPendingStyleRecalc):
3535         
3536             Renamed for consistency.
3537
3538         (WebCore::Document::hasPendingForcedStyleRecalc):
3539         (WebCore):
3540         * dom/Document.h:
3541         (Document):
3542         * rendering/RenderImage.cpp:
3543         (WebCore::RenderImage::imageChanged):
3544
3545 2012-09-27  Mark Pilgrim  <pilgrim@chromium.org>
3546
3547         [Chromium] Remove unused PlatformSupport reference in DraggedIsolatedFileSystem
3548         https://bugs.webkit.org/show_bug.cgi?id=97851
3549
3550         Reviewed by Kentaro Hara.
3551
3552         Part of a refactoring series. See tracking bug 82948.
3553
3554         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp:
3555
3556 2012-09-27  Andrew Lo  <anlo@rim.com>
3557
3558         requestAnimationFrame broken with subframes (DisplayRefreshMonitorManager::registerClient fails to register client)
3559         https://bugs.webkit.org/show_bug.cgi?id=95360
3560
3561         Reviewed by Simon Fraser.
3562
3563         Remove unnecessary code introduced in http://trac.webkit.org/changeset/129808.
3564
3565         No new tests because it's already covered by fast/animation/request-animation-frame-iframe2.html.
3566
3567         * platform/graphics/DisplayRefreshMonitor.cpp:
3568         (WebCore::DisplayRefreshMonitor::addClient):
3569         (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
3570
3571 2012-09-27  Mark Pilgrim  <pilgrim@chromium.org>
3572
3573         [Chromium] Remove unused PlatformSupport reference in FontCacheSkia
3574         https://bugs.webkit.org/show_bug.cgi?id=97850
3575
3576         Reviewed by Kentaro Hara.
3577
3578         Part of a refactoring series. See tracking bug 82948.
3579
3580         * platform/graphics/skia/FontCacheSkia.cpp:
3581
3582 2012-09-27  Mark Pilgrim  <pilgrim@chromium.org>
3583
3584         [Chromium][Android] Remove unused PlatformSupport reference in ScrollbarThemeChromiumAndroid
3585         https://bugs.webkit.org/show_bug.cgi?id=97846
3586
3587         Reviewed by Kentaro Hara.
3588
3589         Part of a refactoring series. See tracking bug 82948.
3590
3591         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3592
3593 2012-09-27  Mark Pilgrim  <pilgrim@chromium.org>
3594
3595         [Chromium] Remove unused PlatformSupport reference in ClipboardChromium
3596         https://bugs.webkit.org/show_bug.cgi?id=97840
3597
3598         Reviewed by Kentaro Hara.
3599
3600         Part of a refactoring series. See tracking bug 82948.
3601
3602         * platform/chromium/ClipboardChromium.cpp:
3603
3604 2012-09-27  Kent Tamura  <tkent@chromium.org>
3605
3606         DateTimeNumericFieldElement should use Localizer functions.
3607         https://bugs.webkit.org/show_bug.cgi?id=97318
3608
3609         Reviewed by Hajime Morita.
3610
3611         Source/WebCore:
3612
3613         Use Localizer functions instead of functions in LocalizedNumber to test
3614         i18n behavior. This affects only layout tests because
3615         Document::getLocalizer() always returns a Localizer for the browser
3616         locale.
3617
3618         To obtain a Localizer object for <input>'s locale from a deep shadow node,
3619         we add localeIdentifier() function to DateTimeFieldElement::FieldOwner
3620         and DateTimeEditElement::EditControlOwner interfaces.
3621
3622         Tests: fast/forms/time-multiple-fields/time-multiple-fields-localization.html
3623
3624         * html/shadow/DateTimeFieldElement.h:
3625         (FieldOwner): Add localeIdentifier callback.
3626         (DateTimeFieldElement): Add localeIdentifier().
3627         * html/shadow/DateTimeFieldElement.cpp:
3628         (WebCore::DateTimeFieldElement::localeIdentifier):
3629         Added. Returns FieldOwner::localeIdentifier if m_fieldOwner is available.
3630
3631         * html/shadow/DateTimeNumericFieldElement.h:
3632         (DateTimeNumericFieldElement): Declare localizer().
3633         * html/shadow/DateTimeNumericFieldElement.cpp:
3634         (WebCore::DateTimeNumericFieldElement::localizer):
3635         Returns a Localizer for DateTimeFieldElement::localeIdentifier()
3636         (WebCore::DateTimeNumericFieldElement::handleKeyboardEvent): Use localizer().
3637         (WebCore::DateTimeNumericFieldElement::value): Use localizer().
3638
3639         * html/shadow/DateTimeEditElement.h:
3640         (EditControlOwner): Add localeIdentifier() callback.
3641         (DateTimeEditElement):
3642         Declare localeIdentifier(), which implements FieldOwner::localeIdentifier().
3643         * html/shadow/DateTimeEditElement.cpp:
3644         (WebCore::DateTimeEditElement::localeIdentifier):
3645         Added. Returns EditControlOwner::localeIdentifier if m_editControlOwner is available.
3646
3647         * html/BaseMultipleFieldsDateAndTimeInputType.h:
3648         (BaseMultipleFieldsDateAndTimeInputType): Declare localeIdentifier(),
3649         which implements EditControlOwner::localeIdentifier().
3650         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
3651         (WebCore::BaseMultipleFieldsDateAndTimeInputType::localeIdentifier):
3652         Added. Returns <input>'s inherited locale identifier.
3653
3654 2012-09-27  Luke Macpherson   <macpherson@chromium.org>
3655
3656         Implement reviewer feedback that I missed on bug 95930.
3657         https://bugs.webkit.org/show_bug.cgi?id=97752
3658
3659         Reviewed by Alexey Proskuryakov.
3660
3661         This patch updates the indentation of function parameters in a few places,
3662         and reserves an appropriate amount of space when using StringBuilder.
3663
3664         * css/CSSBasicShapes.cpp:
3665         (WebCore::buildRectangleString):
3666         (WebCore::CSSBasicShapeRectangle::cssText):
3667         (WebCore::CSSBasicShapeRectangle::serializeResolvingVariables):
3668         (WebCore::CSSBasicShapeCircle::serializeResolvingVariables):
3669         (WebCore::CSSBasicShapeEllipse::serializeResolvingVariables):
3670         (WebCore::buildPolygonString):
3671         * css/Rect.h:
3672         (WebCore::Rect::serializeResolvingVariables):
3673         (WebCore::Quad::serializeResolvingVariables):
3674         (WebCore::Quad::generateCSSString):
3675
3676 2012-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
3677
3678         Unreviewed, rolling out r129823.
3679         http://trac.webkit.org/changeset/129823
3680         https://bugs.webkit.org/show_bug.cgi?id=97837
3681
3682         Cause a bunch of pixel failures on Chrome Linux that look like
3683         real regressions (Requested by ojan on #webkit).
3684
3685         * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
3686         (WebCore::Font::drawGlyphs):
3687         (WebCore::Font::drawComplexText):
3688         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
3689         (WebCore::FontPlatformData::setupPaint):
3690         * platform/graphics/skia/SimpleFontDataSkia.cpp:
3691         (WebCore::SimpleFontData::platformWidthForGlyph):
3692
3693 2012-09-27  Mark Pilgrim  <pilgrim@chromium.org>
3694
3695         [Chromium] Remove screen-related functions from PlatformSupport
3696         https://bugs.webkit.org/show_bug.cgi?id=97474
3697
3698         Reviewed by Adam Barth.
3699
3700         Part of a refactoring series. See tracking bug 82948.
3701         Screen-related functions like screenHorizontalDPI that
3702         used to be on PlatformSupport are now accessed through a new
3703         PlatformPageClient attached to Widget in WebCore-land, which is
3704         implemented by ChromeClientImpl in WebKit-land, which proxies
3705         calls to WebWidgetClient, which is actually implemented in
3706         Chromium-land.
3707
3708         * WebCore.gypi:
3709         * platform/Widget.h:
3710         * platform/chromium/PageClientChromium.h: Copied from Source/WebCore/platform/chromium/PlatformWidget.h.
3711         (PageClientChromium):
3712         * platform/chromium/PlatformScreenChromium.cpp:
3713         (WebCore::toPlatformPageClient):
3714         (WebCore):
3715         (WebCore::screenHorizontalDPI):
3716         (WebCore::screenVerticalDPI):
3717         (WebCore::screenDepth):
3718         (WebCore::screenDepthPerComponent):
3719         (WebCore::screenIsMonochrome):
3720         (WebCore::screenRect):
3721         (WebCore::screenAvailableRect):
3722         * platform/chromium/PlatformSupport.h:
3723         (PlatformSupport):
3724
3725 2012-09-27  Kenichi Ishibashi  <bashi@chromium.org>
3726
3727         [Chromium] FontHarfBuzz.cpp should not use drawTextOnPath().
3728         https://bugs.webkit.org/show_bug.cgi?id=97676
3729
3730         Reviewed by Tony Chang.
3731
3732         Use drawPosText() if possible for vertical text.
3733         Use drawTextOnPath() only if the font doesn't have vhea/vmtx table.
3734
3735         No new tests. No change in behavior on LayoutTests.
3736         Confirmed improvement in vertical text positioning using ipafont and Skia r5677.
3737
3738         * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
3739         (WebCore::drawVerticalTextWithBrokenIdeographs): Added.
3740         (WebCore):
3741         (WebCore::Font::drawGlyphs): Draw vertical text by drawPosText() in a similar manner of FontSkia.cpp.
3742         (WebCore::Font::drawComplexText): Disable setVerticalText(). Complex path doesn't support it now.
3743         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
3744         (WebCore::FontPlatformData::setupPaint): Call setVertialText().
3745         * platform/graphics/skia/SimpleFontDataSkia.cpp:
3746         (WebCore::SimpleFontData::platformWidthForGlyph): Disable setVerticalText() if the font doesn't have vertical metrics.
3747
3748 2012-09-27  Sheriff Bot  <webkit.review.bot@gmail.com>
3749
3750         Unreviewed, rolling out r129806.
3751         http://trac.webkit.org/changeset/129806
3752         https://bugs.webkit.org/show_bug.cgi?id=97831
3753
3754         Broke windows build due to missing header (Requested by jsbell
3755         on #webkit).
3756
3757         * Modules/indexeddb/IDBLevelDBCoding.cpp:
3758         (WebCore::IDBLevelDBCoding::encodeString):
3759         (WebCore::IDBLevelDBCoding::decodeString):
3760
3761 2012-09-27  Levi Weintraub  <leviw@chromium.org>
3762
3763         REGRESSION(r129186): Pressing enter at the end of a line deletes the line
3764         https://bugs.webkit.org/show_bug.cgi?id=97763
3765
3766         Reviewed by Ryosuke Niwa.
3767
3768         r129186 exposed incorrect behavior in RenderText whereby RenderText's lines were
3769         dirtied but the renderer wasn't marked for layout. Rich text editing in GMail exposed
3770         this behavior. RenderText::setTextWithOffset is called with a text string identical
3771         to the current text. It still dirties lines, then calls setText, which has a check
3772         for the case when the strings are the same and returns early and doesn't mark us as
3773         needing layout.
3774
3775         This change adds the same early bailing logic in setText to setTextWithOffset, but
3776         forces setText to work its magic whenever we dirty lines there (and avoid double-
3777         checking that the strings are equal).
3778
3779         * rendering/RenderText.cpp:
3780         (WebCore::RenderText::setTextWithOffset):
3781
3782 2012-09-27  Andrew Lo  <anlo@rim.com>
3783
3784         requestAnimationFrame broken with subframes (DisplayRefreshMonitorManager::registerClient fails to register client)
3785         https://bugs.webkit.org/show_bug.cgi?id=95360
3786
3787         Reviewed by Simon Fraser.
3788
3789         DisplayRefreshMonitorManager::ensureMonitorForClient currently only adds the DisplayRefreshMonitorClient
3790         to the appropriate DisplayRefreshMonitor when a new monitor is created.
3791         It should also do so when it finds an existing monitor.
3792
3793         Test: fast/animation/request-animation-frame-iframe2.html
3794
3795         * platform/graphics/DisplayRefreshMonitor.cpp:
3796         (WebCore::DisplayRefreshMonitor::addClient):
3797         (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
3798
3799 2012-09-27  Erik Arvidsson  <arv@chromium.org>
3800         Unreviewed Chromium debug build fix.
3801
3802         Two fixes makes one breakage
3803
3804         http://trac.webkit.org/changeset/129785
3805         http://trac.webkit.org/changeset/129798
3806
3807         * bindings/v8/V8Binding.h:
3808         (WebCore::toNativeArguments):
3809
3810 2012-09-27  Joshua Bell  <jsbell@chromium.org>
3811
3812         IndexedDB: Optimize encodeString/decodeString
3813         https://bugs.webkit.org/show_bug.cgi?id=97794
3814
3815         Reviewed by Tony Chang.
3816
3817         Optimize string encoding/decoding, which showed up as a CPU hot spot during profiling.
3818         The backing store uses big-endian ordering of 16-bit code unit strings, so a memcopy
3819         isn't sufficient, but the code used StringBuilder::append() character-by-character
3820         and custom byte-swapping which was slow.
3821
3822         Ran a test w/ DumpRenderTree (to avoid multiprocess overhead) taking a 10k character string
3823         and putting it 20k times and getting it 20k times. On my test box, mean time before the
3824         patch was 8.2s, mean time after the patch was 4.6s.
3825
3826         Tested by Chromium's webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.*String*'
3827
3828         * Modules/indexeddb/IDBLevelDBCoding.cpp:
3829         (WebCore::IDBLevelDBCoding::encodeString):
3830         (WebCore::IDBLevelDBCoding::decodeString):
3831
3832 2012-09-27  Mark Pilgrim  <pilgrim@chromium.org>
3833
3834         [Chromium][Mac] Move Mac-specific theme functions out of PlatformSupport
3835         https://bugs.webkit.org/show_bug.cgi?id=97817
3836
3837         Reviewed by Adam Barth.
3838
3839         Part of a refactoring series. See tracking bug 82948. We're calling WebThemeEngine directly now instead of proxying through PlatformSupport.
3840
3841         * platform/chromium/PlatformSupport.h:
3842         (PlatformSupport):
3843         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3844         (WebCore::scrollbarStateToThemeState):
3845         (WebCore):
3846         (WebCore::ScrollbarThemeChromiumMac::paint):
3847
3848 2012-09-27  Erik Arvidsson  <arv@chromium.org>
3849
3850         Fix issue with ClassList which was hitting an assert in debug mode
3851         https://bugs.webkit.org/show_bug.cgi?id=97820
3852
3853         Reviewed by Ojan Vafai.
3854
3855         http://trac.webkit.org/changeset/129779 hit asserts in debug mode when trying to use fastGetAttribute on an SVG element.
3856
3857         No new tests. No change in behavior.
3858
3859         * bindings/v8/V8Binding.h:
3860         (WebCore::toNativeArguments):
3861         * html/ClassList.h:
3862
3863 2012-09-27  Philip Rogers  <pdr@google.com>
3864
3865         Rewrite multithreaded filter job dispatching
3866         https://bugs.webkit.org/show_bug.cgi?id=97500
3867
3868         Reviewed by Dean Jackson.
3869
3870         This patch solves the problem of splitting up images into subregions for multithreaded
3871         filters. This fixes the way we partition the image array into equal-sized chunks.
3872         If we have an array of length N and want to split it into K chunks, we calculate:
3873           int jobSize = N / K; // integer division, so this is floored
3874           int jobSizeExtra = N % K; // modulus produces the remainder
3875         We then split the array into jobSizeExtra number of jobs with size jobSize + 1
3876         and (K - jobSizeExtra) number of jobs with size jobSize. This pattern
3877         is used in each of the 5 filters in this patch.
3878
3879         This patch primarily fixes an error in FEMorphology::platformApply where
3880         the image array was partitioned into (1 + (N / K)) pieces with the last job
3881         taking the remainder. Unfortunately, this can cause overruns in the 2nd-to-last job.
3882         Consider N = 2373 and K = 64 jobs. Job 0 would take indices 0...38, job 1 would take
3883         38...76, etc. Unfortunately the 62nd job takes 2356...2394 which overruns.
3884
3885         To prevent similar issues elsewhere this patch updates all of the filters
3886         to use the same pattern as FEMorphology.
3887
3888         Test: svg/filters/feMorphology-crash.html
3889
3890         * platform/graphics/filters/FEConvolveMatrix.cpp:
3891         (WebCore::FEConvolveMatrix::platformApplySoftware):
3892         * platform/graphics/filters/FEGaussianBlur.cpp:
3893         (WebCore::FEGaussianBlur::platformApply):
3894         * platform/graphics/filters/FELighting.cpp:
3895         (WebCore::FELighting::platformApplyGeneric):
3896         * platform/graphics/filters/FEMorphology.cpp:
3897         (WebCore::FEMorphology::platformApply):
3898
3899             Some special care is taken for Gaussian Blur because there is an
3900             extraHeight parameter for sampling outside the image's dimensions.
3901             This means we use the same partitioning algorithm but add
3902             extraHeight padding on the lower and upper bounds.
3903
3904         * platform/graphics/filters/FETurbulence.cpp:
3905         (WebCore::FETurbulence::platformApplySoftware):
3906
3907 2012-09-27  Mark Pilgrim  <pilgrim@chromium.org>
3908
3909         [Chromium] Move UNIX-specific theme functions out of PlatformSupport
3910         https://bugs.webkit.org/show_bug.cgi?id=96516
3911
3912         Reviewed by Adam Barth.
3913
3914         Call WebThemeEngine functions and use WebThemeEngine enums
3915         directly from the new Platform/ directly; remove all
3916         intermediate functions and enums and conversion functions from
3917         PlatformSupport.
3918         Part of a refactoring series; see tracking bug 82948.
3919
3920         * WebCore.gyp/WebCore.gyp:
3921         * platform/chromium/PlatformSupport.h:
3922         (PlatformSupport):
3923         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
3924         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
3925         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
3926         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
3927         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
3928         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
3929         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
3930         * rendering/RenderThemeChromiumAndroid.cpp:
3931         (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
3932         (WebCore::RenderThemeChromiumAndroid::menuListArrowPadding):
3933         * rendering/RenderThemeChromiumLinux.cpp:
3934         (WebCore::getWebThemeState):
3935         (WebCore):
3936         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
3937         (WebCore::RenderThemeChromiumLinux::paintCheckbox):
3938         (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
3939         (WebCore::RenderThemeChromiumLinux::paintRadio):
3940         (WebCore::RenderThemeChromiumLinux::setRadioSize):
3941         (WebCore::RenderThemeChromiumLinux::paintButton):
3942         (WebCore::RenderThemeChromiumLinux::paintTextField):
3943         (WebCore::RenderThemeChromiumLinux::paintMenuList):
3944         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
3945         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
3946         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
3947         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
3948         (WebCore::RenderThemeChromiumLinux::paintProgressBar):
3949
3950 2012-09-27  Bear Travis  <betravis@adobe.com>
3951
3952         [CSS Exclusions] Rename RenderStyle::wrapShapeInside/Outside to shapeInside/Outside
3953         https://bugs.webkit.org/show_bug.cgi?id=97707
3954
3955         Reviewed by Antti Koivisto.
3956
3957         The exclusions specification has renamed wrap-shape-inside and wrap-shape-outside
3958         to shape-inside and shape-outside. We should rename the getter/setter functions
3959         in RenderStyle, and update the derived variable and function names accordingly.
3960         For more information, see: http://dev.w3.org/csswg/css3-exclusions/#declaring-shapes
3961
3962         Covered by existing tests. No new functionality.
3963
3964         * css/CSSComputedStyleDeclaration.cpp:
3965         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3966         * css/StyleBuilder.cpp:
3967         (WebCore::ApplyPropertyExclusionShape::applyValue):
3968         (WebCore::StyleBuilder::StyleBuilder):
3969         * rendering/ExclusionShapeInsideInfo.cpp:
3970         (WebCore::ExclusionShapeInsideInfo::exclusionShapeInsideInfoForRenderBlock):
3971         (WebCore::ExclusionShapeInsideInfo::isExclusionShapeInsideInfoEnabledForRenderBlock):
3972         (WebCore::ExclusionShapeInsideInfo::removeExclusionShapeInsideInfoForRenderBlock):
3973         (WebCore::ExclusionShapeInsideInfo::computeShapeSize):
3974         * rendering/RenderBlock.cpp:
3975         (WebCore::RenderBlock::styleDidChange):
3976         (WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange):
3977         * rendering/RenderBlock.h:
3978         (WebCore::RenderBlock::exclusionShapeInsideInfo):
3979         * rendering/style/RenderStyle.cpp:
3980         (WebCore::RenderStyle::diff):
3981         * rendering/style/RenderStyle.h:
3982         * rendering/style/StyleRareNonInheritedData.cpp:
3983         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3984         (WebCore::StyleRareNonInheritedData::operator==):
3985         (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
3986         * rendering/style/StyleRareNonInheritedData.h:
3987         (StyleRareNonInheritedData):
3988
3989 2012-09-27  Michael Saboff  <msaboff@apple.com>
3990
3991         ApplicationCacheStorage does not optimally handle 8 bit strings
3992         https://bugs.webkit.org/show_bug.cgi?id=97733
3993
3994         Reviewed by Alexey Proskuryakov.
3995
3996         Added 8 bit string paths.
3997
3998         No functional change, therefore no new tests.
3999
4000         * loader/appcache/ApplicationCacheStorage.cpp:
4001         (WebCore::urlHostHash):
4002         (WebCore::ApplicationCacheStorage::store):
4003         (WebCore::parseHeader):
4004         (WebCore::parseHeaders):
4005
4006 2012-09-27  Stephen Chenney  <schenney@chromium.org>
4007
4008         Unreviewed Chromium debug build fix.
4009
4010         ASSERT contains an inequality of unmatched types. A cast should do the trick.
4011
4012         * bindings/v8/V8Binding.h:
4013         (WebCore::toNativeArguments):
4014
4015 2012-09-27  Adam Klein  <adamk@chromium.org>
4016
4017         Simplify and clarify MutationObserverRegistration interface and usage
4018         https://bugs.webkit.org/show_bug.cgi?id=97742
4019
4020         Reviewed by Ojan Vafai.
4021
4022         Minor cleanups in MutationObserverRegistration: make const methods explicitly const,
4023         use C++ templates to avoid duplicating logic, improve usage of raw pointers vs PassRefPtr,
4024         remove the declaration of a no-longer-existing method.
4025
4026         No change in behavior.
4027
4028         * dom/MutationObserverRegistration.cpp:
4029         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach): Take a raw pointer because we don't always ref the node.
4030         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom): Make this a const method.
4031         * dom/MutationObserverRegistration.h:
4032         (MutationObserverRegistration): Removed declaration of non-existent caseInsensitiveAttributeFilter method.
4033         (WebCore::MutationObserverRegistration::hasTransientRegistrations): const method.
4034         (WebCore::MutationObserverRegistration::isSubtree): Remove superfluous "inline" keyword.
4035         (WebCore::MutationObserverRegistration::observer): const method.
4036         * dom/Node.cpp:
4037         (WebCore):
4038         (WebCore::collectMatchingObserversForMutation): Add a templatized function to reduce duplicated code.
4039         (WebCore::Node::getRegisteredMutationObserversOfType):
4040         (WebCore::Node::registerMutationObserver): Take a raw pointer because we don't always ref the observer.
4041         * dom/Node.h:
4042         (Node): Remove old method, replaced by templatized static function.
4043
4044 2012-09-27  Erik Arvidsson  <arv@chromium.org>
4045
4046         DOM4: Add support for rest parameters to DOMTokenList
4047         https://bugs.webkit.org/show_bug.cgi?id=97335
4048
4049         Reviewed by Ojan Vafai.
4050
4051         This adds support for rest paramaters to DOMTokenList add and remove.
4052         http://dom.spec.whatwg.org/#domtokenlist
4053
4054         The code generator has been updated to understand variadic methods.
4055         When a method has a rest parameter the remaining arguments are collected
4056