createDelay should raise exception when the maxDelayTime parameter is incorrect.
https://bugs.webkit.org/show_bug.cgi?id=102173

Patch by Li Yin <li.yin@intel.com> on 2012-11-14
Reviewed by Chris Rogers.

Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
The specified value must be greater than zero and less than three minutes or a
NOT_SUPPORTED_ERR exception will be thrown.

Source/WebCore:

Tests: webaudio/delaynode-maxdelaylimit.html

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createDelay):
* Modules/webaudio/AudioContext.h:
(AudioContext):
* Modules/webaudio/AudioContext.idl: Add raising exception for createDelay.
* Modules/webaudio/DelayNode.cpp:
(WebCore):
(WebCore::DelayNode::DelayNode):
* Modules/webaudio/DelayNode.h:
(WebCore::DelayNode::create):
(DelayNode):

LayoutTests:

* webaudio/delaynode-maxdelaylimit-expected.txt:
* webaudio/delaynode-maxdelaylimit.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Style BB10 time input field font.
https://bugs.webkit.org/show_bug.cgi?id=102260.

Patch by Tiancheng Jiang <tijiang@rim.com> on 2012-11-14
Reviewed by Rob Buis.

RIM PR 243355
Adjust time input field font using BB10 system default font.

* css/themeBlackBerry.css:
(input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename NATIVE_TYPE_ERR to TypeError
https://bugs.webkit.org/show_bug.cgi?id=102114

Reviewed by Kentaro Hara.

Defines names (mostly) matching WebIDL exception types for use by dom (etc) code.
V8 binding code had colliding enum members, which required prefixing.

No new tests - just internal renames.

* Modules/indexeddb/IDBCursor.cpp: s/NATIVE_TYPE_ERR/TypeError/g
(WebCore::IDBCursor::advance):
(WebCore::IDBCursor::stringToDirection):
(WebCore::IDBCursor::directionToString):
* Modules/indexeddb/IDBDatabase.cpp: Ditto.
(WebCore::IDBDatabase::setVersion):
* Modules/indexeddb/IDBFactory.cpp: Ditto.
(WebCore::IDBFactory::open):
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBObjectStore.cpp: Ditto.
(WebCore::IDBObjectStore::createIndex):
* Modules/indexeddb/IDBTransaction.cpp: Ditto.
(WebCore::IDBTransaction::stringToMode):
(WebCore::IDBTransaction::modeToString):
* bindings/js/JSDOMBinding.cpp: Ditto.
(WebCore::setDOMException):
* bindings/v8/DateExtension.cpp: Prefix ErrorType enum/members w/ V8/v8.
(WebCore::DateExtension::OnSleepDetected):
* bindings/v8/NPV8Object.cpp: Ditto.
(_NPN_SetException):
* bindings/v8/V8Binding.cpp: Ditto.
(WebCore::throwError):
(WebCore::handleMaxRecursionDepthExceeded):
* bindings/v8/V8Binding.h: Ditto.
(WebCore):
* bindings/v8/V8NPObject.cpp: Ditto.
(WebCore::npObjectInvokeImpl):
(WebCore::npObjectGetProperty):
(WebCore::npObjectSetProperty):
(WebCore::npObjectPropertyEnumerator):
* bindings/v8/V8ThrowException.cpp: Rename ALL the errors!
(WebCore::V8ThrowException::setDOMException):
(WebCore::V8ThrowException::throwError):
(WebCore::V8ThrowException::throwTypeError):
(WebCore::V8ThrowException::throwNotEnoughArgumentsError):
* bindings/v8/V8ThrowException.h:
(V8ThrowException):
* bindings/v8/WorkerContextExecutionProxy.cpp: Prefixing (continued)
(WebCore::WorkerContextExecutionProxy::evaluate):
* bindings/v8/custom/V8ArrayBufferCustom.cpp: Ditto.
(WebCore::V8ArrayBuffer::constructorCallback):
* bindings/v8/custom/V8ArrayBufferViewCustom.h: Ditto.
(WebCore::constructWebGLArrayWithArrayBufferArgument):
(WebCore::constructWebGLArray):
(WebCore::setWebGLArrayHelper):
* bindings/v8/custom/V8AudioContextCustom.cpp: Ditto.
(WebCore::V8AudioContext::constructorCallback):
* bindings/v8/custom/V8BlobCustom.cpp: Ditto.
(WebCore::V8Blob::constructorCallback):
* bindings/v8/custom/V8ClipboardCustom.cpp: Ditto.
(WebCore::V8Clipboard::clearDataCallback):
(WebCore::V8Clipboard::setDragImageCallback):
* bindings/v8/custom/V8DOMFormDataCustom.cpp: Ditto.
(WebCore::V8DOMFormData::appendCallback):
* bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: Ditto.
(WebCore::V8SQLResultSetRowList::itemCallback):
* dom/ExceptionCode.h: Add WebIDL exception types.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PDFPlugin should support downloading PDFs
https://bugs.webkit.org/show_bug.cgi?id=102152
<rdar://problem/12555313>

Reviewed by Alexey Proskuryakov.

Clicking on the "Download PDF" HUD button should download the current
PDF to the Downloads folder.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::savePDFToFileInDownloadsFolder): Added. Save the
PDF data to disk, in the Downloads folder. This will only save files with
the .pdf extension, and of MIME type "application/pdf".
* UIProcess/WebPageProxy.h:
(WebPageProxy): Add savePDFToFileInDownloadsFolder.
* UIProcess/WebPageProxy.messages.in: Add savePDFToFileInDownloadsFolder.
* WebProcess/Plugins/PDF/PDFPlugin.h:
(PDFPlugin): Add saveToPDF().
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFLayerControllerDelegate saveToPDF]): Forward saveToPDF delegate callback to PDFPlugin.
(WebKit::PDFPlugin::saveToPDF): Hand WebPageProxy the raw data for the
current PDF, which it will save to the Downloads folder. We receive
the suggested filename during loading.
* WebProcess/Plugins/PDF/SimplePDFPlugin.h:
(WebKit::SimplePDFPlugin::suggestedFilename): Expose a getter for suggestedFilename.
* WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
(WebKit::SimplePDFPlugin::pluginInfo): Add a missing space after an operator.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update DOMException name: InvalidStateError
https://bugs.webkit.org/show_bug.cgi?id=102241

Reviewed by Ojan Vafai.

Source/WebCore:

Patch 11 of 25 to update DOMException name to match the spec and Firefox.

Updated existing tests.

* dom/DOMCoreException.cpp:

LayoutTests:

Updated tests and expectations.

* fast/dom/HTMLDialogElement/dialog-open-expected.txt:
* fast/dom/HTMLDialogElement/dialog-open.html:
* fast/dom/HTMLDialogElement/dialog-show-modal-expected.txt:
* fast/dom/HTMLDialogElement/dialog-show-modal.html:
* fast/dom/Range/range-intersectsNode-exception-expected.txt:
* fast/dom/Range/range-intersectsNode-exception.html:
* fast/dom/Range/range-intersectsNode-expected.txt:
* fast/dom/Range/resources/intersectsNode.js:
* fast/dom/Selection/collapseToX-empty-selection-expected.txt:
* fast/dom/Selection/script-tests/collapseToX-empty-selection.js:
* fast/events/message-port-clone-expected.txt:
* fast/events/message-port-multi-expected.txt:
* fast/files/read-file-async-expected.txt:
* fast/files/workers/worker-read-file-async-expected.txt:
* fast/forms/color/color-setrangetext-expected.txt:
* fast/forms/date/date-setrangetext-expected.txt:
* fast/forms/date/date-stepup-stepdown-expected.txt:
* fast/forms/date/date-stepup-stepdown.html:
* fast/forms/datetime/datetime-setrangetext-expected.txt:
* fast/forms/datetime/datetime-stepup-stepdown-expected.txt:
* fast/forms/datetime/datetime-stepup-stepdown.html:
* fast/forms/datetimelocal/datetimelocal-setrangetext-expected.txt:
* fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt:
* fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html:
* fast/forms/file/file-setrangetext-expected.txt:
* fast/forms/file/input-file-value-expected.txt:
* fast/forms/hidden/hidden-setrangetext-expected.txt:
* fast/forms/image/image-setrangetext-expected.txt:
* fast/forms/input-stepup-stepdown-expected.txt:
* fast/forms/input-stepup-stepdown.html:
* fast/forms/input-valueasnumber-unsupported-expected.txt:
* fast/forms/input-valueasnumber-unsupported.html:
* fast/forms/month/input-valueasdate-expected.txt:
* fast/forms/month/input-valueasdate.html:
* fast/forms/month/month-setrangetext-expected.txt:
* fast/forms/month/month-stepup-stepdown-expected.txt:
* fast/forms/month/month-stepup-stepdown.html:
* fast/forms/number/number-setrangetext-expected.txt:
* fast/forms/number/number-stepup-stepdown-expected.txt:
* fast/forms/number/number-stepup-stepdown-from-renderer.html:
* fast/forms/number/number-stepup-stepdown.html:
* fast/forms/number/number-valueasnumber-expected.txt:
* fast/forms/number/number-valueasnumber.html:
* fast/forms/range/range-setrangetext-expected.txt:
* fast/forms/range/range-stepup-stepdown-expected.txt:
* fast/forms/range/range-stepup-stepdown-from-renderer.html:
* fast/forms/range/range-stepup-stepdown.html:
* fast/forms/setrangetext-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html:
* fast/forms/time/time-setrangetext-expected.txt:
* fast/forms/time/time-stepup-stepdown-expected.txt:
* fast/forms/time/time-stepup-stepdown.html:
* fast/forms/week/week-setrangetext-expected.txt:
* fast/forms/week/week-stepup-stepdown-expected.txt:
* fast/forms/week/week-stepup-stepdown.html:
* fast/js/dfg-custom-getter-throw-expected.txt:
* fast/js/dfg-custom-getter-throw-inlined-expected.txt:
* fast/js/script-tests/dfg-custom-getter-throw-inlined.js:
* fast/js/script-tests/dfg-custom-getter-throw.js:
* fast/mediastream/MediaStreamTrackList-expected.txt:
* fast/notifications/notifications-document-close-crash-expected.txt:
* fast/speech/scripted/start-exception-expected.txt:
* fast/speech/scripted/start-exception.html:
* fast/workers/worker-context-multi-port-expected.txt:
* fast/workers/worker-multi-port-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-responsetype-arraybuffer-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-responsetype-document-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-responsetype-text-expected.txt:
* fast/xpath/detached-subtree-invalidate-iterator-expected.txt:
* http/tests/media/media-source/video-media-source-add-and-remove-buffers-expected.txt:
* http/tests/media/media-source/video-media-source-duration-changed-expected.txt:
* http/tests/media/media-source/video-media-source-objects-expected.txt:
* http/tests/xmlhttprequest/exceptions-expected.txt:
* http/tests/xmlhttprequest/zero-length-response-expected.txt:
* platform/chromium-mac/fast/notifications/notifications-document-close-crash-expected.txt:
* platform/qt/editing/pasteboard/data-transfer-items-expected.txt:
* platform/qt/fast/notifications/notifications-document-close-crash-expected.txt:
* storage/websql/open-database-set-empty-version-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move empty loading to DocumentLoader, simplify FrameLoader::init()
https://bugs.webkit.org/show_bug.cgi?id=101512

Reviewed by Adam Barth.

Source/WebCore:

No new tests, though several outputs changed because we no longer send resource
    load callbacks for empty loads.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource): Handle empty main resource
    loads directly here.
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader): Initialize some variables whose values
    were previously being reset in init(). Given that the FrameLoader is in
    an inconsistent state before init() is called anyway, there doesn't seem
    to be a disadvantage to just initializing them to their post-init() values.
(WebCore::FrameLoader::init): Just call startLoadingMainResource(), instead of
    doing a bunch of direct calls to functions FrameLoader shouldn't know about.
* loader/FrameLoaderStateMachine.cpp:
* loader/FrameLoaderStateMachine.h:
* loader/MainResourceLoader.cpp: Throughout, remove the concept of an empty load.
(WebCore::MainResourceLoader::loadNow): This only returned true when an empty
    load got deferred, which won't happen now. Return void and always treat
    as returning false.
* loader/MainResourceLoader.h:

Tools:

Chromium DRT has some code that doesn't play nicely with empty urls and incorrectly
interprets them as a non-empty load. This ensures
http/tests/navigation/new-window-redirect-history.html continues to pass
in chromium.

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::updateForCommittedLoad):

LayoutTests:

Don't expect resource load callbacks for empty loads.

* http/tests/inspector/network/network-iframe-load-and-delete.html:
* http/tests/loading/redirect-methods-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PDFPlugin should make use of PDFKit's fluid zooming
https://bugs.webkit.org/show_bug.cgi?id=101962
<rdar://problem/12555229>

Reviewed by Anders Carlsson.

Expose the notion of a frame that handles page scale gestures via WebFrame and to the bundle via WKBundleFrame.
The only frames that will purport to handle page scale gestures are those which contain PluginDocuments
backed by PDFPlugin, for now. Also, allow PDFKit to do its own fluid zooming animation.

* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameHandlesPageScaleGesture): Provide WKBundleFrameHandlesPageScaleGesture to
inform the injected bundle whether or not the frame handles scaling itself.
* WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: Add WKBundleFrameHandlesPageScaleGesture.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::geometryDidChange): Allow PDFKit to use its fluid zooming instead of changing
the scale factor immediately.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::handlesPageScaleGesture): For now, the only frames that handle page scale
gestures themselves are plugins that purport to handle page scale changes themselves (i.e. only PDFPlugin).
* WebProcess/WebPage/WebFrame.h:
(WebFrame):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the Production build after r134640 broke it.

* WebProcess/Network/WebResourceLoader.h:
(WebKit::WebResourceLoader::resourceLoadIdentifier): Use the un-used.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Improve debug functionality in FatFingers
https://bugs.webkit.org/show_bug.cgi?id=102263

Reviewed by Antonio Gomes.

- use logAlways to log even in release.
- dump shadow tree info if available.

* WebKitSupport/FatFingers.cpp:
(BlackBerry::WebKit::FatFingers::isElementClickable):
(BlackBerry::WebKit::FatFingers::checkFingerIntersection):
(BlackBerry::WebKit::FatFingers::findIntersectingRegions):
(BlackBerry::WebKit::FatFingers::checkForText):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Don't let shift-click turn popup into tab.
https://bugs.webkit.org/show_bug.cgi?id=102254

Reviewed by Adam Barth.

Change http://trac.webkit.org/changeset/132399 broke shift-click on
compose in GMail.  We didn't want to change behavior that people were
depending on, and this quick fix seems a good compromise between user
intent and developer intent.

* src/ChromeClientImpl.cpp:
(WebKit::updatePolicyForEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update DOMException name: WrongDocumentError
https://bugs.webkit.org/show_bug.cgi?id=102096

Reviewed by Ojan Vafai.

Source/WebCore:

Patch 4 of 25 to update DOMException name to match the spec and Firefox.

Updated existing tests.

* dom/DOMCoreException.cpp:

LayoutTests:

Updated tests and expectations.

* fast/dom/Range/compareBoundaryPoints-1-expected.txt:
* fast/dom/Range/compareBoundaryPoints-1.html:
* fast/dom/move-nodes-across-documents.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More steps towards actually hosting layers in the UI process
https://bugs.webkit.org/show_bug.cgi?id=102275

Reviewed by Andreas Kling.

* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::rootLayerID):
Add a getter for the root layer ID.

* UIProcess/mac/RemoteLayerTreeHost.h:
(RemoteLayerTreeHost):
Add root layer member variable. Make the RemoteLayerTreeHost class a GraphicsLayerClient.

* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
Initialize the root layer to null.

(WebKit::RemoteLayerTreeHost::notifyAnimationStarted):
(WebKit::RemoteLayerTreeHost::notifyFlushRequired):
(WebKit::RemoteLayerTreeHost::paintContents):
Add empty stubs.

(WebKit::RemoteLayerTreeHost::commit):
Try to get the root layer.

(WebKit::RemoteLayerTreeHost::getOrCreateLayer):
Look up the layer with the given ID in the m_layers hash table and create it if it doesn't exist.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Incorrect line-height for styled menulist (select tag)
in windows theme.
https://bugs.webkit.org/show_bug.cgi?id=79435

Patch by Lynn Neir <lynn.neir@skype.net> on 2012-11-14
Reviewed by Brent Fulgham

Applied same fix as in RenderThemeSafari::adjustMenuListButtonStyle
to Windows theme to fix issue.

Tests: fast/forms/menulist-restrict-line-height.html
       fast/forms/control-restrict-line-height.html
       fast/forms/basic-selects.html

* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::adjustMenuListButtonStyle): Set line
height to the correct initial height.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Marked fake-mouse-move tests as failing.
https://bugs.webkit.org/show_bug.cgi?id=102277

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update DOMException name: InUseAttributeError
https://bugs.webkit.org/show_bug.cgi?id=102141

Reviewed by Ojan Vafai.

Patch 10 of 25 to update DOMException name to match the spec and Firefox.

The name for this is not in the spec but the case was selected to match
Firefox. http://mxr.mozilla.org/mozilla-central/source/dom/base/domerr.msg#18

INUSE_ATTRIBUTE_ERR is historical and not used in any spec or any of our tests.

* dom/DOMCoreException.cpp:
* dom/ExceptionCode.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Updating baselines after r134631.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: test conversion batch 3
https://bugs.webkit.org/show_bug.cgi?id=102168

Reviewed by Tony Chang.

These were all pretty straightforward. metadata.html could include
some additional tests that check the metadata after a versionchange
transaction aborts, but I think that's tested in one of the intversion
tests.

* storage/indexeddb/exceptions-expected.txt:
* storage/indexeddb/factory-deletedatabase-expected.txt:
* storage/indexeddb/index-duplicate-keypaths-expected.txt:
* storage/indexeddb/index-multientry-expected.txt:
* storage/indexeddb/index-population-expected.txt:
* storage/indexeddb/metadata-expected.txt:
* storage/indexeddb/resources/database-basics.js:
  Fix failure when run as a chromium browser test.

* storage/indexeddb/resources/exceptions.js:
  Moved some asserts from running before the database is opened to
  afterward but they appear to be testing the same thing.
(transactionComplete):
  close can't proceed until the transactions are complete, something
  setVersion didn't have to deal with.

* storage/indexeddb/resources/factory-deletedatabase.js:
  The conditions under which deleteDatabase is called in this test is
  _slightly_ different. Previously, deleteDatabase was called from
  inside a versionchange transaction, causing the original connection
  to receive a versionchange event. With upgradeneeded we have to close
  the original connection before entering a versionchange transaction,
  so the second connection is now what closes in response to the
  deleteDatabase's versionchange event.

* storage/indexeddb/resources/index-duplicate-keypaths.js:
(testCollideAutoIncrementSetup):
(testCollideAutoIncrement):
* storage/indexeddb/resources/index-multientry.js:
(prepareDatabase):
(createIndexOnStoreWithData):
* storage/indexeddb/resources/index-population.js:
(prepareDatabase.request.onsuccess):
(prepareDatabase):
(doSetVersion2):
(setVersion2):
(setVersion2Abort):
* storage/indexeddb/resources/metadata.js:
(prepareDatabase):
(snapshotConnection1):
(secondOpen.request.onupgradeneeded):
(secondOpen.request.onsuccess):
(secondOpen):
(thirdOpen.request.onupgradeneeded):
(thirdOpen.request.onerror):
(thirdOpen):
(fourthOpen.request.onupgradeneeded):
(fourthOpen.request.onsuccess):
(fourthOpen):
(checkState):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Refactor theme font lookup into a factory
https://bugs.webkit.org/show_bug.cgi?id=101949

Patch by Scott Violet <sky@chromium.org> on 2012-11-14
Reviewed by Tony Chang.

This will ultimately allow us to use what is currently in RenderThemeChromiumLinux on windows.

No new tests. Refactoring only.

* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* rendering/RenderThemeChromiumFontProvider.cpp: Added.
(WebCore):
(WebCore::RenderThemeChromiumFontProvider::defaultGUIFont): Moved into RenderThemeFontProvider.
* rendering/RenderThemeChromiumFontProvider.h: Added.
(WTF):
(WebCore):
(RenderThemeChromiumFontProvider): This is the font related methods.
* rendering/RenderThemeChromiumFontProviderLinux.cpp: Added.
(WebCore):
(WebCore::RenderThemeChromiumFontProvider::setDefaultFontSize): What was in RenderThemeChromiumSkia::setDefaultFontSize.
(WebCore::RenderThemeChromiumFontProvider::systemFont): What was in RenderThemeChromiumSkia::systemFont.
* rendering/RenderThemeChromiumFontProviderWin.cpp: Added.
(WebCore):
(WebCore::pointsToPixels): Moved from RenderThemeChromiumWin.
(WebCore::getNonClientMetrics): Moved from RenderThemeChromiumWin.
(WebCore::systemFontSize): Moved from RenderThemeChromiumWin.
(WebCore::RenderThemeChromiumFontProvider::systemFont): Moved from RenderThemeChromiumWin.
(WebCore::RenderThemeChromiumFontProvider::setDefaultFontSize): Moved from RenderThemeChromiumWin.
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore::RenderThemeChromiumSkia::RenderThemeChromiumSkia): Moved into RenderThemeFontProvider.
(WebCore::RenderThemeChromiumSkia::systemFont): Calls to RenderThemeChromiumFontProvider.
(WebCore::RenderThemeChromiumSkia::setDefaultFontSize): Calls to RenderThemeChromiumFontProvider.
* rendering/RenderThemeChromiumSkia.h:
(RenderThemeChromiumSkia): Moves defaultFontSize into RenderThemeChromiumFontProvider.
* rendering/RenderThemeChromiumWin.cpp: Moves font code into RenderThemeFontProviderWin.
(WebCore):
* rendering/RenderThemeChromiumWin.h: Removed overriden methods now handled by RenderThemeChromiumSkia.
(RenderThemeChromiumWin):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Rename m_CoordinatedGraphicsLayerClient to m_coordinator
https://bugs.webkit.org/show_bug.cgi?id=102133

Renamed m_CoordinatedGraphicsLayerClient to m_coordinator.
Also, there is no need for calling setCoordinator every time the tree changes,
since we can call it once when the layer is created, now that LayerTreeCoordinator
is the GraphicsLayerFactory.

Reviewed by Kenneth Rohde Christiansen

No change in functionality.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setChildren):
(WebCore::CoordinatedGraphicsLayer::addChild):
(WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
(WebCore::CoordinatedGraphicsLayer::addChildAbove):
(WebCore::CoordinatedGraphicsLayer::addChildBelow):
(WebCore::CoordinatedGraphicsLayer::replaceChild):
(WebCore::CoordinatedGraphicsLayer::setContentsToImage):
(WebCore::CoordinatedGraphicsLayer::setMaskLayer):
(WebCore::CoordinatedGraphicsLayer::setReplicatedByLayer):
(WebCore::CoordinatedGraphicsLayer::flushCompositingState):
(WebCore::CoordinatedGraphicsLayer::syncChildren):
(WebCore::CoordinatedGraphicsLayer::syncFilters):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):
(WebCore::CoordinatedGraphicsLayer::syncAnimations):
(WebCore::CoordinatedGraphicsLayer::syncCanvas):
(WebCore::CoordinatedGraphicsLayer::ensureImageBackingStore):
(WebCore::CoordinatedGraphicsLayer::tiledBackingStoreUpdatesAllowed):
(WebCore::CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect):
(WebCore::CoordinatedGraphicsLayer::beginContentUpdate):
(WebCore::CoordinatedGraphicsLayer::createTile):
(WebCore::CoordinatedGraphicsLayer::updateTile):
(WebCore::CoordinatedGraphicsLayer::removeTile):
(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
(WebCore::CoordinatedGraphicsLayer::setCoordinator):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::~LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::paintContents):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Only resolve presentation attribute style once per shared ElementAttributeData.
<http://webkit.org/b/100990>

Reviewed by Antti Koivisto.

Track the "presentation attribute style dirty" state on ElementAttributeData instead of in a Node flag.
This allows us to avoid duplicate work for ElementAttributeData that are shared between multiple elements,
since the state is no longer per-Element.

I've left the presentation attribute cache in there for now, since it still covers the case where
two elements have the same presentation attributes but different non-presentation attributes.
It's likely that we're not gaining much from it anymore, but that's a topic for another patch.

(WebCore::StyledElement::rebuildPresentationAttributeStyle):
* dom/StyledElement.h:
(WebCore::StyledElement::presentationAttributeStyle):
(WebCore::ElementAttributeData::ElementAttributeData):
* dom/ElementAttributeData.h:
(WebCore::ElementAttributeData::ElementAttributeData):
(ElementAttributeData):
* dom/Node.h:

    Move presentation attribute style dirty flag from Node to ElementAttributeData.

* dom/ElementAttributeData.cpp:
(SameSizeAsElementAttributeData):

    Add a compile-time object size assertion for ElementAttributeData.

* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):

    Don't mark the presentation attribute style dirty if the element is using an immutable (implies
    shared) ElementAttributeData and another element has already generated the StylePropertySet.
    The element itself is still marked for style recalc like before, this just avoids the process
    of converting the attributes to CSS properties.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134664 268f45cc-cd09-0410-ab3c-d52691b4dbfc